OFFSET
0,3
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
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.]
N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
MAPLE
f:= proc(n) option remember; local j;
j:= n - 2^ilog2(n);
2*procname(j)+3*procname(j+1);
end proc:
f(0):= 0: f(1):= 1:
map(f, [$0..100]); # Robert Israel, Jun 12 2018
MATHEMATICA
f[n_] := f[n] = With[{j = n - 2^Floor@Log[2, n]}, 2 f[j] + 3 f[j+1]];
f[0] = 0; f[1] = 1;
f /@ Range[0, 100] (* Jean-François Alcover, Aug 31 2020, after Robert Israel *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
N. J. A. Sloane, Jan 02 2010
STATUS
approved