Re: A079559 prod(n>=1, 1+x^(2^n-1) )

Lambert Klasen Lambert.Klasen at gmx.net
Sun Jul 17 21:22:55 CEST 2005


Dear seqfans,

> The funny recursion
> 
> void A079559(int f, int n)
> {
>     int m;
>     printf("1,");
>     for (m=1; m<n; m*=2)  A079559(f+m, m);
>     printf("0,");
> }
> 
> started with args (0, 2**k) seems to give A079559.
> Any explanation why that is?

yes, for some 2^n both seq. do the same.
it can be seen by stressing another ruler like output of both seqs:

110110011011000
1101100110110000
110110011011000
11011001101100000
110110011011000
1101100110110000
110110011011000
110110011011000000
110110011011000
1101100110110000
110110011011000
11011001101100000
110110011011000
1101100110110000
110110011011000
1101100110110000000
110110011011000
1101100110110000
110110011011000
....

it is easy to see that prod(n>=1, 1+x^(2^n-1) ) emerges this way.
your program does the same, but
it is more a nesting than a recursion:

here the pattern for 
./A079559 0 [1 2 3 5 9]

1: (1 0)
2: (1 (1 0) 0)
3: (1 (1 0) (1 (1 0) 0) 0)
5: (1 (1 0) (1 (1 0) 0) (1 (1 0) (1 (1 0) 0) 0) 0)
9: (1 (1 0) (1 (1 0) 0) (1 (1 0) (1 (1 0) 0) 0) \
   (1 (1 0) (1 (1 0) 0) (1 (1 0) (1 (1 0) 0) 0) 0) 0)


best regards
         Lambert

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl





More information about the SeqFan mailing list