|
|
A151917
|
|
a(0)=0, a(1)=1; for n>=2, a(n) = (2/3)*(Sum_{i=1..n-1} 3^wt(i)) + 1, where wt() = A000120().
|
|
5
|
|
|
0, 1, 3, 5, 11, 13, 19, 25, 43, 45, 51, 57, 75, 81, 99, 117, 171, 173, 179, 185, 203, 209, 227, 245, 299, 305, 323, 341, 395, 413, 467, 521, 683, 685, 691, 697, 715, 721, 739, 757, 811, 817, 835, 853, 907, 925, 979, 1033, 1195, 1201, 1219
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Also, total number of "ON" cells at n-th stage in two of the four wedges of the "Ulam-Warburton" two-dimensional cellular automaton of A147562, but including the central ON cell. It appears that this is very close to A139250, the toothpick sequence. - Omar E. Pol, Feb 22 2015
|
|
LINKS
|
|
|
FORMULA
|
For n>=2, a(n) = 2*A151920(n-2) + 1.
|
|
EXAMPLE
|
n=3: (2/3)*(3^1+3^1+3^2+3^1) + 1 = (2/3)*18 + 1 = 13.
|
|
MATHEMATICA
|
Array[(2/3) Sum[3^(Total@ IntegerDigits[i, 2]), {i, # - 1}] + 1 &, 50] (* Michael De Vlieger, Nov 01 2022 *)
|
|
PROG
|
(PARI) a(n) = if (n<2, n, 1 + 2*sum(i=1, n-1, 3^hammingweight(i))/3); \\ Michel Marcus, Feb 22 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|