[math-fun] Describe and add
Could please someone compute and analyse this sequence? Start with a(1) = 1 Describe a(1) --> = 11 (one "1") Add a(1) to it's description: 1 + 11 = 12 This is a(2) -- so we have: a(1) = 1 a(2) = 12 Go on from there : Description of a(2) : 1112 Add a(2) to it's description: 12 + 1112 = 1124 This is a(3) -- we have now: a(1) = 1 a(2) = 12 a(3) = 1124 Go on from there : Description of a(3) : 211214 Add a(3) to it's description: 1124 + 211214 = 212338 This is a(4) -- we have now: a(1) = 1 a(2) = 12 a(3) = 1124 a(4) = 212338 Go on from there : Description of a(4) : 11222318 Add a(4) to it's description: 212338 + 11222318 = 11434656 This is a(5) -- we have now: a(1) = 1 a(2) = 12 a(3) = 1124 a(4) = 212338 a(5) = 11434656 etc. -------- Questions: - has this seq. a fixed point (or loop)? - what about other beginnings? (start with a(1) = 0 for instance) Best, É.
"Eric Angelini" <keynews.tv@skynet.be> wrote: :Could please someone compute and analyse this sequence? : :Start with a(1) = 1 :Describe a(1) --> = 11 (one "1") :Add a(1) to it's description: 1 + 11 = 12 [...] :a(1) = 1 :a(2) = 12 :a(3) = 1124 :a(4) = 212338 :a(5) = 11434656 Here's some perl code: perl -Mbigint -wle '$n=$a=1; while (1) { print "$n: $a"; ++$n; $a = desc($a) + $a } sub desc { my %a; ++$a{$_} for split //, shift; join "", map +($a{$_}, $_), sort { $a <=> $b } keys %a }' Compute: 1: 1 2: 12 3: 1124 4: 212338 5: 11434656 6: 2124676182 7: 215338937900 8: 2011338654109729 9: 20314234480170281558 10: 20317265802504533296 11: 50431498946030705115 12: 50834622289546876944 13: 50937835732083050773 14: 50937875857418523592 15: 51038998088873897421 16: 51241110320289174260 17: 81755323561805346079 18: 101966556706331618898 19: 101968597938887792727 20: 102070720070404367576 [...] 25000: 209208887438850939711053 [...] 1718184: 18417097587111721307162018 :Questions: : :- has this seq. a fixed point (or loop)? :- what about other beginnings? :(start with a(1) = 0 for instance) No: a(n+1) > a(n) is guaranteed by the definition. See references to "self-describing" in OEIS for some sequences defined along similar lines. Hugo
On Thu, 18 Aug 2005 hv@crypt.org wrote:
> Here's some perl code:
> perl -Mbigint -wle '$n=$a=1; while (1) { print "$n: $a"; ++$n; $a = desc($a) + $a } sub desc { my %a; ++$a{$_} for split //, shift; join "", map +($a{$_}, $_), sort { $a <=> $b } keys %a }'
Oops! I hadn't noticed that you had already wrote a script for that.
Obviously I'm reading these mails very late.
> Compute:
[cut]
> 9: 20314234480170281558
> 10: 20317265802504533296
> 11: 50431498946030705115
[cut...]
Hmmm, the outputs of our programs differ from some point on. Thus mine or
yours is wrong - this is not exclusive or: they may both be wrong...
However looking at the rate of growth of your computed terms as estimated
at first sight suggests me it may be far too slow. A naive estimate
suggests that it should be at least as fast (or faster) than the aa
sequence and that the first digits "until a certain point" should still be
1,2 or 3.
Incidentally one nice feature of the aa seq is that it is basically
base-independent provided that the base is greater than or equal to 3. Of
course this modification makes it base dependent and thus much less
attractive. Maybe it would be more interesting if restricted to base 3, or
perhaps, say, base 4 and in the latter case one may look e.g. at the
number of occurrencies of 4's, but then I would expect it to be
approximately growing , but otherwise rather wild.
Michele
--
>What is the current status of chaos theory? A decade ago it was supposed
>to be The Next Big Thing.
Yeah, well, that kind of thing is notoriously hard to predict, longterm.
- Lee Rudolph in sci.math, "Re: Chaos Theory?"
Michele Dondi <blazar@pcteor1.mi.infn.it> wrote: :On Thu, 18 Aug 2005 hv@crypt.org wrote: : :> Here's some perl code: :> perl -Mbigint -wle '$n=$a=1; while (1) { print "$n: $a"; ++$n; $a = desc($a) + $a } sub desc { my %a; ++$a{$_} for split //, shift; join "", map +($a{$_}, $_), sort { $a <=> $b } keys %a }' : :Oops! I hadn't noticed that you had already wrote a script for that. :Obviously I'm reading these mails very late. : :> Compute: :[cut] :> 9: 20314234480170281558 :> 10: 20317265802504533296 :> 11: 50431498946030705115 :[cut...] : :Hmmm, the outputs of our programs differ from some point on. Thus mine or :yours is wrong - this is not exclusive or: they may both be wrong... Check Eric's original series of examples again: this is not Conway's "look and say" type of description. My guess (as encoded in my perl) was that the digits are sorted before describing, so that the description of 212338 is 11222318. Replacing the desc() subroutine above with: sub desc { $_="$_[0]"; s/((\d)\2*)/length($1).$2/ge; $_ } should give the sequence you expected. It isn't clear whether I guessed the correct rule, nor whether Eric actually intended what he wrote; Eric has promised clarification on the issue, but I believe he's been away on a trip. In principle both are perfectly valid sequences though. Hugo
On Tue, 6 Sep 2005 hv@crypt.org wrote: > :Hmmm, the outputs of our programs differ from some point on. Thus mine or > :yours is wrong - this is not exclusive or: they may both be wrong... > > Check Eric's original series of examples again: this is not Conway's > "look and say" type of description. My guess (as encoded in my perl) was > that the digits are sorted before describing, so that the description You're right. I hadn't read carefully. I think that any further followup should be offlist(s). I set up Reply-To accordingly. Modify the recipients lists at will to include whomever you think is appropriate... > In principle both are perfectly valid sequences though. Indeed. Although I'm not that keen on base-dependent or self-descripting sequences - of course Conway's is an exception, especially since it's fundamentally not base dependent. Michele -- > primordinarily concerned with providing ... Neat "word"! - Donald Arseneau in comp.text.tex
On Thu, 18 Aug 2005, Eric Angelini wrote:
Could please someone compute and analyse this sequence?
Start with a(1) = 1 Describe a(1) --> = 11 (one "1") Add a(1) to it's description: 1 + 11 = 12 [and so on...]
I can't help with the analysis, and I doubt that anything as simple as what is found for the sequence of audioactive elements could be said - but I would be happy to be contradicted. However I can help with a quick perl script: #!/usr/bin/perl -l use strict; use warnings; use bigint; $_=1; { print my $o=$_; s/((\d)\2*)/(length $1).$2/ge; $_+=$o; <>, redo; } __END__ Output: 1 12 1124 212338 1211334656 1112213525496172 31221113152327355441607884 1311223113111543352330284851467051780698 111321221321133115142315123621344927293054493947386362638861942616 311312112211131221232115111412131115111213161211243740343033324425294734255535516245454370615560667973830274103732 1321131112212231131122111213122115311411121113311531121113111611122112452629253224272531563339232924322532242625512536355352484547475838465750368051618862646083796870789687941287275044 Michele -- Never attribute to malice that which can be adequately explained by stupidity - "Hanlon's Razor"
participants (3)
-
Eric Angelini -
hv@crypt.org -
Michele Dondi