login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A151747 Except for boundary cases (n <= 3, j = 0, 1, 2^i-1), satisfies a(n) = a(2^i+j) = 2 a(j) + a(j+1), where n = 2^i + j, 0 <= j < 2^i . 6
0, 1, 3, 5, 8, 9, 11, 17, 21, 15, 11, 18, 25, 29, 39, 54, 53, 27, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 160, 129, 51, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 448, 305, 99, 11, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The boundary cases are covered by the following formulas:
a(n) = 2n-1 if n<=3.
a(n) = 1+(3*i+1)*2^(i-2) if j=0.
a(n) = 3+ 3*2^(i-1) if j= 1.
a(n) = 2*a(j)+a(j+1)-1 if j=2^i-1.
LINKS
David Applegate, The movie version [See A151725, variant]
David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]
EXAMPLE
If written as a triangle:
.0,
.1,
.3, 5,
.8, 9, 11, 17,
.21, 15, 11, 18, 25, 29, 39, 54,
.53, 27, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 160,
.129, 51, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 448,
.305, 99, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 449, 309, 113, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 425, 455, 331, 170, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1076, 1296, 1200,
.705, 195, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 449, 309, 113, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 425, 455, 331, 170, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1076, 1296, 1201, 709, 209, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 425, 455, 331, 170, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1076, 1297, 1207, 731, 266, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1077, 1305, 1241, 832, 481, 483, 657, 837, 1087, 1355, 1410, 1249, 1253, 1623, ...
then the rows (omitting the first two terms of each row) converge to A151748.
MAPLE
A151747 := proc(n) option remember; local i, j;
if (n <= 0) then
0;
elif (n <= 3) then
2*n-1;
else
i := floor(log(n)/log(2));
j := n - 2^i;
if (j = 0) then (3*i+1)*2^(i-2)+1;
elif (j = 1) then 3*2^(i-1)+3;
elif (j = 2^i-1) then 2*procname(j)+procname(j+1)-1;
else 2*procname(j)+procname(j+1);
end if;
end if;
end proc;
MATHEMATICA
a[n_] := a[n] = Module[{i, j}, Which[n <= 0, 0, n <= 3, 2n-1, True, i = Floor[Log2[n]]; j = n-2^i; Which[j == 0, (3i+1)*2^(i-2)+1, j == 1, 3*2^(i-1)+3, j == 2^i-1, 2a[j] + a[j+1] - 1, True, 2a[j] + a[j+1]]]];
Table[a[n], {n, 0, 67}] (* Jean-François Alcover, Aug 04 2022, from Maple code *)
CROSSREFS
The first column gives A170881.
Sequence in context: A261786 A124401 A292526 * A088597 A080640 A189164
KEYWORD
nonn,tabf
AUTHOR
David Applegate, Jun 16 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 5 22:20 EDT 2024. Contains 372290 sequences. (Running on oeis4.)