A187213
Number of Q-toothpicks added at n-th stage to the structure of A187212.
Original entry on oeis.org
0, 1, 2, 2, 4, 4, 8, 10, 8, 4, 8, 12, 12, 16, 28, 30, 16, 4, 8, 12, 12, 16, 28, 32, 20, 16, 28, 36, 40, 60, 88, 78, 32, 4, 8, 12, 12, 16, 28, 32, 20, 16, 28, 36, 40, 60, 88, 80, 36, 16, 28, 36, 40, 60, 88, 84, 56, 60, 92, 112
Offset: 0
Contribution from Omar E. Pol, Mar 29 2011 (Start):
If written as a triangle begins:
0,
1,
2,
2,4,
4,8,10,8,
4,8,12,12,16,28,30,16,
4,8,12,12,16,28,32,20,16,28,36,40,60,88,78,32,
(End)
A187214
Number of gulls (or G-toothpicks) added at n-th stage in the first quadrant of the gullwing structure of A187212.
Original entry on oeis.org
0, 1, 1, 2, 2, 4, 5, 4, 2, 4, 6, 6, 8, 14, 15, 8, 2, 4, 6, 6, 8, 14, 16, 10, 8, 14, 18, 20, 30, 44, 39, 16, 2, 4, 6, 6, 8, 14, 16, 10, 8, 14, 18, 20, 30, 44, 40, 18, 8, 14, 18, 20, 30, 44, 42, 28, 30, 46, 56, 70, 104, 128, 95
Offset: 1
At stage 1 we start in the first quadrant from a Q-toothpick centered at (1,0) with its endpoints at (0,0) and (1,1). There are no gulls in the structure, so a(1) = 0.
At stage 2 we place a gull (or G-toothpick) with its midpoint at (1,1) and its endpoints at (2,0) and (2,2), so a(2) = 1. There is only one exposed midpoint at (2,2).
At stage 3 we place a gull with its midpoint at (2,2), so a(3) = 1. There are two exposed endpoints.
At stage 4 we place two gulls, so a(4) = 2. There are two exposed endpoints.
At stage 5 we place two gulls, so a(5) = 2. There are four exposed endpoints.
And so on.
If written as a triangle begins:
0,
1,
1,2,
2,4,5,4,
2,4,6,6,8,14,15,8,
2,4,6,6,8,14,16,10,8,14,18,20,30,44,39,16,
2,4,6,6,8,14,16,10,8,14,18,20,30,44,40,18,8,14,18,20,30,44,42,28,...
It appears that rows converge to A151688.
A139250
Toothpick sequence (see Comments lines for definition).
Original entry on oeis.org
0, 1, 3, 7, 11, 15, 23, 35, 43, 47, 55, 67, 79, 95, 123, 155, 171, 175, 183, 195, 207, 223, 251, 283, 303, 319, 347, 383, 423, 483, 571, 651, 683, 687, 695, 707, 719, 735, 763, 795, 815, 831, 859, 895, 935, 995, 1083, 1163, 1199, 1215, 1243, 1279, 1319, 1379
Offset: 0
a(10^10) = 52010594272060810683. - _David A. Corneth_, Mar 26 2015
- D. 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
- L. D. Pryor, The Inheritance of Inflorescence Characters in Eucalyptus, Proceedings of the Linnean Society of New South Wales, V. 79, (1954), p. 81, 83.
- Richard P. Stanley, Enumerative Combinatorics, volume 1, second edition, chapter 1, exercise 95, figure 1.28, Cambridge University Press (2012), p. 120, 166.
- N. J. A. Sloane, Table of n, a(n) for n = 0..65535
- AlgoMotion, Toothpick Sequence Visualized with Circle of Fifths Harmony | 256 Steps, Youtube video (2024).
- David Applegate, The movie version
- David Applegate, Animation of first 32 stages
- David Applegate, Animation of first 64 stages
- David Applegate, Animation of first 128 stages
- David Applegate, Animation of first 256 stages
- David Applegate, C++ program to generate these animations - creates postscript for a specific n
- David Applegate, Generates many postscripts, converts them to gifs, and glues the gifs together into an animation
- David Applegate, Generates b-files for A139250, A139251, A147614
- David Applegate, The b-files for A139250, A139251, A147614 side-by-side
- David Applegate, A three-state CA for the toothpick structure
- 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.], which is also available at arXiv:1004.3036v2
- Joe Champion, Ultimate toothpick pattern, Photo 1, Photo 2, Photo 3, Photo 4, Boise Math Circles, Boise State University. [Links updated by _P. Michael Hutchins_, Mar 03 2018]
- Barry Cipra, What comes next?, Science (AAAS) 327: 943.
- Steven R. Finch, Toothpicks and Live Cells, July 21, 2015. [Cached copy, with permission of the author]
- Ulrich Gehmann, Martin Reiche, World mountain machine, Berlin, (2014), first edition, p. 205, 238, 253.
- Mats Granvik, Additional illustration: Number blocks where each number tells how many times a point on the square grid is crossed or connected to by a toothpick, Jun 21 2009.
- Gordon Hamilton, Three integer sequences from recreational mathematics, Video (2013?).
- J. K. Hamilton, I. R. Hooper, and C. R. Lawrence, Exploring microwave absorption by non-periodic metasurfaces, Advanced Electromagnetics, 10(3), 1-6 (2021).
- M. F. Hasler, Illustration of initial terms
- M. F. Hasler, Illustrations (Three slides)
- Brian Hayes, Joshua Trees and Toothpicks
- Brian Hayes, Idealized Joshua tree, a figure from "Joshua Trees and Toothpicks" (see preceding link)
- Brian Hayes, The Toothpick Sequence - Bit-Player
- Benoit Jubin, Illustration of initial terms
- Mathemaesthetics, 2'796'203 Toothpicks, 2'048 Generations, Youtube video (2021).
- Ayliean McDonald, Toothpick fractal and breaking rules, Youtube video (2021)
- Chris Moore, Gallery, see the section on David Griffeath's Cellular Automata.
- Omar E. Pol, Illustration of initial terms
- Omar E. Pol, Illustration of initial terms using "gulls" (or G-toothpicks)
- Omar E. Pol, Illustration of initial terms using quarter-circles (or Q-toothpicks)
- Omar E. Pol, Illustration of the toothpick structure (after 23 steps)
- Omar E. Pol, Illustration of patterns in the toothpick structure (after 32 steps)
- Omar E. Pol, Illustration of patterns in the toothpick structure (after 32 steps) [Cached copy, with permission]
- Omar E. Pol, Illustration of initial terms of A139250, A160120, A147562 (Overlapping figures)
- Omar E. Pol, Illustration of initial terms of A160120, A161206, A161328, A161330 (triangular grid and toothpick structure)
- Omar E. Pol, Illustration of the substructures in the first quadrant (As pieces of a puzzle), after 32 stages
- Omar E. Pol, Illustration of the potential growth direction of the arms of the substructures, after 32 stages
- Olbaid Fractalium, Toothpick sequence Part 1, (Watch from minute 0:00 until 3:13), Youtube video (2023).
- Programing Puzzles & Code Golf Stack Exchange, Generate toothpick sequence
- L. D. Pryor, Illustration of initial terms (Fig. 2a)
- L. D. Pryor, The Inheritance of Inflorescence Characters in Eucalyptus, Proceedings of the Linnean Society of New South Wales, V. 79, (1954), p. 79-89.
- E. Rowland, Toothpick sequence from cellular automaton on square grid
- E. Rowland, Initial stages of toothpick sequence from cellular automaton on square grid (includes Mathematica code)
- K. Ryde, ToothpickTree.
- Daniel Shiffman, Coding Challenge #126: Toothpicks, The Coding Train video (2018)
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
- N. J. A. Sloane and Brady Haran, Terrific Toothpick Patterns, Numberphile video (2018)
- Alex van den Brandhof and Paul Levrie, Tandenstokerrij, Pythagoras, Wiskundetijdschrift voor Jongeren, 55ste Jaargang, Nummer 6, Juni 2016, (see the cover, pages 1, 18, 19 and the back cover).
- Lu Wang, Minecraft Toothpicks N = 53
- Wikipedia, Cairo pentagonal tiling
- Wikipedia, H tree
- Wikipedia, Toothpick sequence
- Wikipedia, T-square (fractal)
- Index entries for sequences related to toothpick sequences
- Index entries for sequences related to cellular automata
Cf.
A000079,
A002450,
A006519,
A139251,
A139252,
A139253,
A147614,
A139560,
A152968,
A152978,
A152980,
A152998,
A153000,
A153001,
A153003,
A153004,
A153006,
A153007,
A000217,
A007583,
A007683,
A000396,
A000225,
A000668,
A006516,
A006095,
A019988,
A160570,
A160552,
A000969,
A001316,
A151566,
A160406,
A160408,
A160702,
A078008,
A151548,
A001045,
A147562,
A160124,
A160120,
A160160,
A160170,
A160172,
A161206,
A161328,
A161330,
A171977,
A194810,
A296510,
A296612,
A299476,
A299478,
A323650,
A336532.
-
G := (x/((1-x)*(1+2*x))) * (1 + 2*x*mul(1+x^(2^k-1)+2*x^(2^k),k=0..20)); # N. J. A. Sloane, May 20 2009, Jun 05 2009
# From N. J. A. Sloane, Dec 25 2009: A139250 is T, A139251 is a.
a:=[0,1,2,4]; T:=[0,1,3,7]; M:=10;
for k from 1 to M do
a:=[op(a),2^(k+1)];
T:=[op(T),T[nops(T)]+a[nops(a)]];
for j from 1 to 2^(k+1)-1 do
a:=[op(a), 2*a[j+1]+a[j+2]];
T:=[op(T),T[nops(T)]+a[nops(a)]];
od: od: a; T;
-
CoefficientList[ Series[ (x/((1 - x)*(1 + 2x))) (1 + 2x*Product[1 + x^(2^k - 1) + 2*x^(2^k), {k, 0, 20}]), {x, 0, 53}], x] (* Robert G. Wilson v, Dec 06 2010 *)
a[0] = 0; a[n_] := a[n] = Module[{m, k}, m = 2^(Length[IntegerDigits[n, 2]] - 1); k = (2m^2+1)/3; If[n == m, k, k + 2 a[n - m] + a[n - m + 1] - 1]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 06 2018, after David A. Corneth *)
-
A139250(n,print_all=0)={my(p=[], /* set of "used" points. Points are written as complex numbers, c=x+iy. Toothpicks are of length 2 */
ee=[[0,1]], /* list of (exposed) endpoints. Exposed endpoints are listed as [c,d] where c=x+iy is the position of the endpoint, and d (unimodular) is the direction */
c,d,ne, cnt=1); print_all && print1("0,1"); n<2 && return(n);
for(i=2,n, p=setunion(p, Set(Mat(ee~)[,1])); /* add endpoints (discard directions) from last move to "used" points */
ne=[]; /* new (exposed) endpoints */
for( k=1, #ee, /* add endpoints of new toothpicks if not among the used points */
setsearch(p, c=ee[k][1]+d=ee[k][2]*I) || ne=setunion(ne,Set([[c,d]]));
setsearch(p, c-2*d) || ne=setunion(ne,Set([[c-2*d,-d]]));
); /* using Set() we have the points sorted, so it's easy to remove those which finally are not exposed because they touch a new toothpick */
forstep( k=#ee=eval(ne), 2, -1, ee[k][1]==ee[k-1][1] && k-- && ee=vecextract(ee,Str("^"k"..",k+1)));
cnt+=#ee; /* each exposed endpoint will give a new toothpick */
print_all && print1(","cnt));cnt} \\ M. F. Hasler, Apr 14 2009
-
\\works for n > 0
a(n) = {my(k = (2*msb(n)^2 + 1) / 3); if(n==msb(n),k , k + 2*a(n-msb(n)) + a(n - msb(n) + 1) - 1)}
msb(n)=my(t=0);while(n>>t>0,t++);2^(t-1)\\ David A. Corneth, Mar 26 2015
-
def msb(n):
t = 0
while n>>t > 0:
t += 1
return 2**(t - 1)
def a(n):
k = (2 * msb(n)**2 + 1) / 3
return 0 if n == 0 else k if n == msb(n) else k + 2*a(n - msb(n)) + a(n - msb(n) + 1) - 1
[a(n) for n in range(101)] # Indranil Ghosh, Jul 01 2017, after David A. Corneth's PARI script
Verified and extended, a(49)-a(53), using the given PARI code by
M. F. Hasler, Apr 14 2009
Edited by
N. J. A. Sloane, Apr 29 2009, incorporating comments from
Omar E. Pol,
M. F. Hasler,
Rob Pratt,
Jaume Oliver Lafont,
Franklin T. Adams-Watters,
R. J. Mathar,
David W. Wilson,
David Applegate,
Benoit Jubin and others.
A187210
Q-toothpick sequence (see Comments for precise definition).
Original entry on oeis.org
0, 1, 5, 12, 24, 46, 66, 88, 128, 182, 222, 244, 284, 338, 394, 464, 584, 718, 790, 812, 852, 906, 962, 1032, 1152, 1286, 1374, 1444, 1564, 1714, 1882, 2128, 2488, 2814, 2950, 2972, 3012, 3066, 3122, 3192, 3312, 3446, 3534, 3604, 3724, 3874, 4042, 4288, 4648, 4974, 5126, 5196, 5316, 5466, 5634, 5880, 6240, 6582, 6814, 7060, 7436, 7890, 8458, 9296, 10328
Offset: 0
From _Omar E. Pol_, Apr 02 2016: (Start)
Examples that are related to the toothpick sequence A139250 (see the first formula):
For n = 5 we have that A139250(5-2) = 7, A267698(5-2) = 13, A267694(5-1) = 16 and m = 3, so a(5) = 2*7 + 13 + 16 + 3 = 46.
For n = 6 we have that A139250(6-2) = 11, A267698(6-2) = 25, A267694(6-1) = 20 and m = -1, so a(6) = 2*11 + 25 + 20 - 1 = 66. (End)
From _Omar E. Pol_, Sep 13 2016: (Start)
Examples that are related to the Gullwing sequence A187220 (see the second formula):
For n = 5 we have that A187220(5-1) = 15, A267698(5-2) = 13, A267694(5-1) = 16 and m = 2, so a(5) = 15 + 13 + 16 + 2 = 46.
For n = 6 we have that A187220(6-1) = 23, A267698(6-2) = 25, A267694(6-1) = 20 and m = -2, so a(6) = 23 + 25 + 20 - 2 = 66. (End)
- A. Adamatzky and G. J. Martinez, Designing Beauty: The Art of Cellular Automata, Springer, 2016, pages 59, 62 (note that the Q-toothpick cellular automaton is erroneously attributed to Nathaniel Johnston).
- Nathaniel Johnston, Table of n, a(n) for n = 0..177
- David Applegate, The movie version
- 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.]
- Elisabet Edvardsson and Eva Mossberg, The Q-toothpick Cellular Automaton, Journal of Cellular Automata, Vol. 14, Issue 1-2, (2019), p. 51-68.
- Nathaniel Johnston, Animation of first 19 generations
- Nathaniel Johnston, Illustration of a(5) = 46, "Front Matter" 2015. The College Mathematics Journal 46 (1). Mathematical Association of America: 1-1. doi:10.4169/college.math.j.46.1.fm.
- Nathaniel Johnston, The Q-Toothpick Cellular Automaton
- Nathaniel Johnston, The Q-Toothpick post in ConwayLife.com
- Omar E. Pol, Illustration of initial terms
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
- Index entries for sequences related to cellular automata
- Index entries for sequences related to toothpick sequences
A182838
H-toothpick sequence in the first quadrant starting with a D-toothpick placed on the diagonal [(0,1), (1,2)] (see Comments for precise definition).
Original entry on oeis.org
0, 1, 3, 7, 11, 15, 21, 31, 39, 43, 49, 61, 77, 91, 105, 127, 143, 147, 153, 165, 181, 197, 217, 249, 285, 307, 321, 349, 391, 431, 467, 517, 549, 553, 559, 571, 587, 603, 623, 655, 691, 715
Offset: 0
We start at stage 0 with no toothpicks.
At stage 1 we place a D-toothpick [(0,1),(1,2)], so a(1)=1.
At stage 2 we place a toothpick [(1,2),(1,3)] and a D-toothpick [(1,2),(2,1)], so a(2)=1+2=3.
At stage 3 we place 4 elements: a D-toothpick [(1,3),(0,4)], a D-toothpick [(1,3),(2,4)], a D-toothpick [(2,1),(3,2)] and a toothpick [(2,1),(2,0)], so a(3)=3+4=7. Etc.
The first hexagon appears in the structure after 4 stages.
Cf.
A139250,
A153000,
A161206,
A170888,
A172308,
A182632,
A182634,
A182839,
A182840,
A187212,
A194444,
A220524,
A233970,
A267458,
A267694,
A267698.
A187216
Q-toothpick sequence starting with two opposite Q-toothpicks centered at the same grid point.
Original entry on oeis.org
0, 2, 8, 16, 30, 52, 82, 104, 142, 196, 266, 288, 326, 380, 450, 504, 606, 756, 890, 912, 950, 1004, 1074, 1128, 1230, 1380, 1514, 1568, 1670, 1820, 1986, 2168, 2494, 2900, 3162, 3184, 3222, 3276, 3346, 3400, 3502, 3652, 3786, 3840, 3942, 4092, 4258, 4440
Offset: 0
On the infinite square grid at stage 0 we start with no Q-toothpicks.
At stage 1 we place two opposite Q-toothpicks centered at (0,0). One of the Q-toothpicks lies on the first quadrant with its endpoints at (0,1) and (1,0). The other Q-toothpick lies on the third quadrant with its endpoints at (0,-1) and (-1,0). So a(1) = 2. There are 4 exposed endpoints.
At stage 2 we place 6 Q-toothpicks, so a(2) = 2+6 = 8.
At stage 3 we place 8 Q-toothpicks, so a(3) = 8+8 = 16.
At stage 4 we place 14 Q-toothpicks, so a(4) = 16+14 = 30.
After 4 stages in the Q-toothpick structure there are 1 circle, 2 "heads" and 12 exposed endpoints.
- Nathaniel Johnston, Table of n, a(n) for n = 0..200
- Nathaniel Johnston, C program for computing terms
- 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.]
- Nathaniel Johnston, The Q-Toothpick Cellular Automaton
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
A282470
Q-toothpick sequence with Q-toothpicks of radius 1 and 2 (see Comments for precise definition).
Original entry on oeis.org
0, 1, 9, 16, 40, 62, 102, 124, 204, 258, 338, 360, 440, 494, 606, 676, 916, 1050, 1194, 1216, 1296, 1350, 1462, 1532, 1772, 1906, 2082, 2152, 2392, 2542, 2878, 3124, 3844, 4170, 4442, 4464, 4544, 4598, 4710, 4780, 5020, 5154, 5330, 5400, 5640, 5790, 6126, 6372, 7092, 7418, 7722, 7792, 8032, 8182, 8518
Offset: 0
Cf.
A282471 (essentially the first differences).
Cf.
A187210 (Q-toothpick sequence).
Showing 1-7 of 7 results.
Comments