%I #13 Feb 24 2021 02:48:18
%S 1,8,12,28,12,36,36,92,12,36,36,108,36,108,108,292,12,36,36,108,36,
%T 108,108,324,36,108,108,324,108,324,324,908,12,36,36,108,36,108,108,
%U 324,36,108,108,324,108,324,324,972,36,108,108,324,108,324,324,972,108,324,324
%N First differences of A160414.
%H David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, 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.]
%H N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>
%H Omar E. Pol, <a href="http://www.polprimos.com/imagenespub/polca026.jpg">Illustration of initial terms</a> [From _Omar E. Pol_, Nov 11 2009]
%H D. Applegate, Omar E. Pol, N. J. A. Sloane, <a href="http://arxiv.org/abs/1004.3036">The toothpick sequence and other sequences from cellular automata</a>, arXiv:1004.3036 [math.CO] [From _R. J. Mathar_, Oct 16 2010]
%F 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
%p Contribution from _R. J. Mathar_, Oct 16 2010: (Start)
%p isA000079 := proc(n) if type(n,'even') then nops(numtheory[factorset](n)) = 1 ; else false ; fi ; end proc:
%p A048883 := proc(n) 3^wt(n) ; end proc:
%p A161415 := proc(n) if n = 1 then 1; elif isA000079(n) then 4*A048883(n-1)-2*n ; else 4*A048883(n-1) ; end if; end proc: seq(A161415(n),n=1..90) ; (End)
%t a[1] = 1; a[n_] := 4*3^DigitCount[n-1, 2, 1] - If[IntegerQ[Log[2, n]], 2n, 0];
%t Array[a, 60] (* _Jean-François Alcover_, Nov 17 2017, after _N. J. A. Sloane_ *)
%Y Cf. A139250, A139251, A160411, A160413, A160414, A160417.
%Y Cf. A160727.
%Y Cf. A048883, A161411, A162349. [From _Omar E. Pol_, Nov 11 2009]
%K nonn
%O 1,2
%A _Omar E. Pol_, May 20 2009, Jun 13 2009
%E More terms from _R. J. Mathar_, Oct 16 2010