login
Toothpick sequence in the three-dimensional grid.
23

%I #36 Feb 24 2021 02:48:18

%S 0,1,3,7,15,23,31,39,55,87,143,175,191,199,215,247,303,359,423,503,

%T 655,887,1239,1383,1431,1463,1487,1527,1583,1639,1703,1783,1935,2167,

%U 2519,2735,2903,3079,3351,3711,4207,4655,5191,5855,7023,8511,10511,11279,11583,11919,12183,12375,12487,12607

%N Toothpick sequence in the three-dimensional grid.

%C Similar to A139250, except the toothpicks are placed in three dimensions, not two. The first toothpick is in the z direction. Thereafter, new toothpicks are placed at free ends, as in A139250, perpendicular to the existing toothpick, but choosing in rotation the x-direction, y-direction, z-direction, x-direction, etc.

%C The graph of this sequence has a nice self-similar shape: it looks the when the x-range is multiplied by 2, e.g. a(0..125) vs a(0..250) or a(0..500). - _M. F. Hasler_, Dec 12 2018

%H M. F. Hasler, <a href="/A160160/b160160.txt">Table of n, a(n) for n = 0..500</a>

%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 R. J. Mathar, <a href="/A160160/a160160.cc">C++ program</a>

%H R. J. Mathar, <a href="/A160160/a160160_2.eps">View after stage 1</a>

%H R. J. Mathar, <a href="/A160160/a160160_3.eps">View after stage 2</a>

%H R. J. Mathar, <a href="/A160160/a160160_4.eps">View after stage 3</a>

%H R. J. Mathar, <a href="/A160160/a160160_5.eps">View after stage 4</a>

%H R. J. Mathar, <a href="/A160160/a160160_6.eps">View after stage 5</a>

%H R. J. Mathar, <a href="/A160160/a160160_7.eps">View after stage 6</a>

%H R. J. Mathar, <a href="/A160160/a160160_8.eps">View after stage 7</a>

%H R. J. Mathar, <a href="/A160160/a160160_9.eps">View after stage 8</a>

%H R. J. Mathar, <a href="/A160160/a160160_10.eps">View after stage 9</a>

%H R. J. Mathar, <a href="/A160160/a160160_11.eps">View after stage 10</a>

%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 Alex van den Brandhof and Paul Levrie, <a href="https://pyth.eu/uploads/user/ArchiefPDF/Pyth55-6.pdf">Tandenstokerrij</a>, Pythagoras, Viskundetijdschrift voor Jongeren, 55ste Jaargang, Nummer 6, Juni 2016, (see page 19 and the back cover).

%F Partial sums of A160161: a(n) = Sum_{1 <= k <= n} A160161(k) for all n >= 0. - _M. F. Hasler_, Dec 12 2018

%o (PARI) A160160_vec(n,o=1)={local(s(U)=[Vecsmall(Vec(V)+U)|V<-E], E=[Vecsmall([1,1,1])], J=[], M,A,B,U); [if(i>4, M+=8*#E=setminus(setunion(A=s(U=matid(3)[i%3+1,]), B=select(vecmin,s(-U))), J=setunion(setunion(setintersect(A,B),E),J)),M=1<<i-1)|i<-[o..n]]} \\ Returns the vector a(1..n), or a(0..n) with second arg = 0. - _M. F. Hasler_, Dec 11 2018

%o (PARI) A160160(n)=sum(k=1,n,A160161[k]) \\ if A160161=A160161_vec(n) has already been computed. - _M. F. Hasler_, Dec 12 2018

%Y Cf. A139250, A160120, A160161, A160170, A170884, A170885, A170876.

%K nonn,look

%O 0,3

%A _Omar E. Pol_, May 03 2009, May 06 2009

%E Edited by _N. J. A. Sloane_, Jan 02 2009

%E Extended to a(76) with C++ program and illustrations by _R. J. Mathar_, Jan 09 2010

%E Extended to 500 terms by _M. F. Hasler_, Dec 12 2018