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
0, 1, 6, 4, 24, 4, 20, 12, 84, 4, 20, 12, 76, 12, 60, 36, 276, 4, 20, 12, 76, 12, 60, 36, 260, 12, 60, 36, 228, 36, 180, 108, 876, 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, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
-1,3
COMMENTS
A169648 and A147582 agree except at these terms.
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.]
FORMULA
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)).
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.)
Since there is a simple explicit formula for A147582(n), this provides a simple way to generate A169648.
EXAMPLE
Can be written in the form of a triangle:
0,
1,
6,
4,24,
4,20,12,84,
4,20,12,76,12,60,36,276,
4,20,12,76,12,60,36,260,12,60,36,228,36,180,108,876,
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,
...
MAPLE
a:=proc(n) option remember; local f, j, k, t1;
if n=-1 then RETURN(0); elif n=0 then RETURN(1); elif n=1 then RETURN(6);
else k:=floor(log(n)/log(2)); j:=n-2^k; t1 := 2^floor(log(j+1)/log(2));
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;
RETURN(3*a(j)+f);
fi;
end;
[seq(a(n), n=-1..200)];
CROSSREFS
Equals A169688/4. Cf. A169697 (limit of rows).
Sequence in context: A318209 A120462 A236602 * A328757 A061592 A081631
KEYWORD
nonn,tabf
AUTHOR
N. J. A. Sloane, Apr 14 2010
STATUS
approved

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 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)