login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A169689 (A169648(4n+4) - A147582(4n+5))/4. 4

%I #9 Feb 24 2021 02:48:19

%S 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 260,12,60,36,228,36,180,108,876,4,20,12,76,12,60,36,260,12,60,36,228,

%U 36,180,108,844,12,60,36,228,36,180,108,780,36,180,108,684,108,540,324,2724,4

%N (A169648(4n+4) - A147582(4n+5))/4.

%C A169648 and A147582 agree except at these terms.

%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>

%F 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 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<k, f=3(j+1) if r=k, and otherwise set f=0. Then a(n) = 3*a(j) + f. (The explicit formula in the previous line is better.)

%F Since there is a simple explicit formula for A147582(n), this provides a simple way to generate A169648.

%e Can be written in the form of a triangle:

%e 0,

%e 1,

%e 6,

%e 4,24,

%e 4,20,12,84,

%e 4,20,12,76,12,60,36,276,

%e 4,20,12,76,12,60,36,260,12,60,36,228,36,180,108,876,

%e 4,20,12,76,12,60,36,260,12,60,36,228,36,180,108,844,12,60,36,228,36,180,108,780,36,180,108,684,108,540,324,2724,

%e ...

%p a:=proc(n) option remember; local f,j,k,t1;

%p if n=-1 then RETURN(0); elif n=0 then RETURN(1); elif n=1 then RETURN(6);

%p else k:=floor(log(n)/log(2)); j:=n-2^k; t1 := 2^floor(log(j+1)/log(2));

%p if t1=j+1 and j < 2^k-1 then f := j+1 elif t1=j+1 then f := 3*(j+1) else f := 0; fi;

%p RETURN(3*a(j)+f);

%p fi;

%p end;

%p [seq(a(n),n=-1..200)];

%Y Equals A169688/4. Cf. A169697 (limit of rows).

%K nonn,tabf

%O -1,3

%A _N. J. A. Sloane_, Apr 14 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)