|
|
A329355
|
|
The binary expansion of a(n) is the second through n-th terms of A000002 - 1.
|
|
3
|
|
|
0, 1, 3, 6, 12, 25, 50, 101, 203, 406, 813, 1627, 3254, 6508, 13017, 26034, 52068, 104137, 208275, 416550, 833101, 1666202, 3332404, 6664809, 13329618, 26659237, 53318475, 106636950, 213273900, 426547801, 853095602, 1706191204, 3412382409, 6824764818
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
a(11) = 813 has binary expansion q = {1, 1, 0, 0, 1, 0, 1, 1, 0, 1}, and q + 1 is {2, 2, 1, 1, 2, 1, 2, 2, 1, 2}, which is the second through 11th terms of A000002.
|
|
MATHEMATICA
|
kolagrow[q_]:=If[Length[q]<2, Take[{1, 2}, Length[q]+1], Append[q, Switch[{q[[Length[Split[q]]]], q[[-2]], Last[q]}, {1, 1, 1}, 0, {1, 1, 2}, 1, {1, 2, 1}, 2, {1, 2, 2}, 0, {2, 1, 1}, 2, {2, 1, 2}, 2, {2, 2, 1}, 1, {2, 2, 2}, 1]]]
kol[n_Integer]:=If[n==0, {}, Nest[kolagrow, {1}, n-1]];
Table[FromDigits[kol[n]-1, 2], {n, 30}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|