# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a169689 Showing 1-1 of 1 %I A169689 #9 Feb 24 2021 02:48:19 %S A169689 0,1,6,4,24,4,20,12,84,4,20,12,76,12,60,36,276,4,20,12,76,12,60,36, %T A169689 260,12,60,36,228,36,180,108,876,4,20,12,76,12,60,36,260,12,60,36,228, %U A169689 36,180,108,844,12,60,36,228,36,180,108,780,36,180,108,684,108,540,324,2724,4 %N A169689 (A169648(4n+4) - A147582(4n+5))/4. %C A169689 A169648 and A147582 agree except at these terms. %H A169689 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.] %H A169689 N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS %F A169689 a(-1)=0, a(0)=1, a(1)=6. For n >= 2, let n = 2^k+j with 0 <= j < 2^k, and write j+1 = 2^m*(2t+1). Then a(n) = 4*(3^(m+1)-2^(m+1))*3^wt(t), except if j=2^k-1 we must add 2^(k+1) to the result (here wt(t) = A000120(t)). %F A169689 Recurrence: a(-1)=0, a(0)=1, a(1)=6. For n>=2, write n = 2^k + j, with 0 <= j < 2^k. If j+1 is a power of 2, say j+1 = 2^r, set f=j+1 if r