OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..16384
FORMULA
G.f.: x * Product_{k>=0} (1 + x^(2^k) + 6*x^(2^(k+1))).
a(2^n-1) = (6^n - 1)/5 = A003464(n); a(2^n) = 1; a(2^n+1) = 6*n + 1 = A016921(n). - Alois P. Heinz, Mar 17 2021
MAPLE
a:= proc(n) option remember; `if`(n<2, n, (q->
`if`(d=1, 6*a(q)+a(q+1), a(q)))(iquo(n, 2, 'd')))
end:
seq(a(n), n=0..70); # Alois P. Heinz, Mar 17 2021
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], a[n/2], 6 a[(n - 1)/2] + a[(n + 1)/2]]; Table[a[n], {n, 0, 64}]
nmax = 64; CoefficientList[Series[x Product[(1 + x^(2^k) + 6 x^(2^(k + 1))), {k, 0, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Mar 17 2021
STATUS
approved