OFFSET
1,2
LINKS
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
Omar E. Pol, Illustration of initial terms [From Omar E. Pol, Nov 11 2009]
D. Applegate, Omar E. Pol, N. J. A. Sloane, The toothpick sequence and other sequences from cellular automata, arXiv:1004.3036 [math.CO] [From R. J. Mathar, Oct 16 2010]
FORMULA
For n > 1, a(n) = 4*A048883(n-1), except a(n) = 4*A048883(n-1) - 2n if n is a power of 2. - N. J. A. Sloane, Jul 13 2009
MAPLE
Contribution from R. J. Mathar, Oct 16 2010: (Start)
isA000079 := proc(n) if type(n, 'even') then nops(numtheory[factorset](n)) = 1 ; else false ; fi ; end proc:
A048883 := proc(n) 3^wt(n) ; end proc:
MATHEMATICA
a[1] = 1; a[n_] := 4*3^DigitCount[n-1, 2, 1] - If[IntegerQ[Log[2, n]], 2n, 0];
Array[a, 60] (* Jean-François Alcover, Nov 17 2017, after N. J. A. Sloane *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, May 20 2009, Jun 13 2009
EXTENSIONS
More terms from R. J. Mathar, Oct 16 2010
STATUS
approved