cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 20 results. Next

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

Views

Author

Omar E. Pol, Apr 24 2008

Keywords

Comments

A toothpick is a copy of the closed interval [-1,1]. (In the paper, we take it to be a copy of the unit interval [-1/2, 1/2].)
We start at stage 0 with no toothpicks.
At stage 1 we place a toothpick in the vertical direction, anywhere in the plane.
In general, given a configuration of toothpicks in the plane, at the next stage we add as many toothpicks as possible, subject to certain conditions:
- Each new toothpick must lie in the horizontal or vertical directions.
- Two toothpicks may never cross.
- Each new toothpick must have its midpoint touching the endpoint of exactly one existing toothpick.
The sequence gives the number of toothpicks after n stages. A139251 (the first differences) gives the number added at the n-th stage.
Call the endpoint of a toothpick "exposed" if it does not touch any other toothpick. The growth rule may be expressed as follows: at each stage, new toothpicks are placed so their midpoints touch every exposed endpoint.
This is equivalent to a two-dimensional cellular automaton. The animations show the fractal-like behavior.
After 2^k - 1 steps, there are 2^k exposed endpoints, all located on two lines perpendicular to the initial toothpick. At the next step, 2^k toothpicks are placed on these lines, leaving only 4 exposed endpoints, located at the corners of a square with side length 2^(k-1) times the length of a toothpick. - M. F. Hasler, Apr 14 2009 and others. For proof, see the Applegate-Pol-Sloane paper.
If the third condition in the definition is changed to "- Each new toothpick must have at exactly one of its endpoints touching the midpoint of an existing toothpick" then the same sequence is obtained. The configurations of toothpicks are of course different from those in the present sequence. But if we start with the configurations of the present sequence, rotate each toothpick a quarter-turn, and then rotate the whole configuration a quarter-turn, we obtain the other configuration.
If the third condition in the definition is changed to "- Each new toothpick must have at least one of its endpoints touching the midpoint of an existing toothpick" then the sequence n^2 - n + 1 is obtained, because there are no holes left in the grid.
A "toothpick" of length 2 can be regarded as a polyedge with 2 components, both on the same line. At stage n, the toothpick structure is a polyedge with 2*a(n) components.
Conjecture: Consider the rectangles in the sieve (including the squares). The area of each rectangle (A = b*c) and the edges (b and c) are powers of 2, but at least one of the edges (b or c) is <= 2.
In the toothpick structure, if n >> 1, we can see some patterns that look like "canals" and "diffraction patterns". For example, see the Applegate link "A139250: the movie version", then enter n=1008 and click "Update". See also "T-square (fractal)" in the Links section. - Omar E. Pol, May 19 2009, Oct 01 2011
From Benoit Jubin, May 20 2009: The web page "Gallery" of Chris Moore (see link) has some nice pictures that are somewhat similar to the pictures of the present sequence. What sequences do they correspond to?
For a connection to Sierpiński triangle and Gould's sequence A001316, see the leftist toothpick triangle A151566.
Eric Rowland comments on Mar 15 2010 that this toothpick structure can be represented as a 5-state CA on the square grid. On Mar 18 2010, David Applegate showed that three states are enough. See links.
Equals row sums of triangle A160570 starting with offset 1; equivalent to convolving A160552: (1, 1, 3, 1, 3, 5, 7, ...) with (1, 2, 2, 2, ...). Equals A160762: (1, 0, 2, -2, 2, 2, 2, -6, ...) convolved with 2*n - 1: (1, 3, 5, 7, ...). Starting with offset 1 equals A151548: [1, 3, 5, 7, 5, 11, 17, 15, ...] convolved with A078008 signed (A151575): [1, 0, 2, -2, 6, -10, 22, -42, 86, -170, 342, ...]. - Gary W. Adamson, May 19 2009, May 25 2009
For a three-dimensional version of the toothpick structure, see A160160. - Omar E. Pol, Dec 06 2009
From Omar E. Pol, May 20 2010: (Start)
Observation about the arrangement of rectangles:
It appears there is a nice pattern formed by distinct modular substructures: a central cross surrounded by asymmetrical crosses (or "hidden crosses") of distinct sizes and also by "nuclei" of crosses.
Conjectures: after 2^k stages, for k >= 2, and for m = 1 to k - 1, there are 4^(m-1) substructures of size s = k - m, where every substructure has 4*s rectangles. The total number of substructures is equal to (4^(k-1)-1)/3 = A002450(k-1). For example: If k = 5 (after 32 stages) we can see that:
a) There is a central cross, of size 4, with 16 rectangles.
b) There are four hidden crosses, of size 3, where every cross has 12 rectangles.
c) There are 16 hidden crosses, of size 2, where every cross has 8 rectangles.
d) There are 64 nuclei of crosses, of size 1, where every nucleus has 4 rectangles.
Hence the total number of substructures after 32 stages is equal to 85. Note that in every arm of every substructure, in the potential growth direction, the length of the rectangles are the powers of 2. (See illustrations in the links. See also A160124.) (End)
It appears that the number of grid points that are covered after n-th stage of the toothpick structure, assuming the toothpicks have length 2*k, is equal to (2*k-2)*a(n) + A147614(n), k > 0. See the formulas of A160420 and A160422. - Omar E. Pol, Nov 13 2010
Version "Gullwing": on the semi-infinite square grid, at stage 1, we place a horizontal "gull" with its vertices at [(-1, 2), (0, 1), (1, 2)]. At stage 2, we place two vertical gulls. At stage 3, we place four horizontal gulls. a(n) is also the number of gulls after n-th stage. For more information about the growth of gulls see A187220. - Omar E. Pol, Mar 10 2011
From Omar E. Pol, Mar 12 2011: (Start)
Version "I-toothpick": we define an "I-toothpick" to consist of two connected toothpicks, as a bar of length 2. An I-toothpick with length 2 is formed by two toothpicks with length 1. The midpoint of an I-toothpick is touched by its two toothpicks. a(n) is also the number of I-toothpicks after n-th stage in the I-toothpick structure. The I-toothpick structure is essentially the original toothpick structure in which every toothpick is replaced by an I-toothpick. Note that in the physical model of the original toothpick structure the midpoint of a wooden toothpick of the new generation is superimposed on the endpoint of a wooden toothpick of the old generation. However, in the physical model of the I-toothpick structure the wooden toothpicks are not overlapping because all wooden toothpicks are connected by their endpoints. For the number of toothpicks in the I-toothpick structure see A160164 which also gives the number of gullwing in a gullwing structure because the gullwing structure of A160164 is equivalent to the I-toothpick structure. It also appears that the gullwing sequence A187220 is a supersequence of the original toothpick sequence A139250 (this sequence).
For the connection with the Ulam-Warburton cellular automaton see the Applegate-Pol-Sloane paper and see also A160164 and A187220.
(End)
A version in which the toothpicks are connected by their endpoints: on the semi-infinite square grid, at stage 1, we place a vertical toothpick of length 1 from (0, 0). At stage 2, we place two horizontal toothpicks from (0,1), and so on. The arrangement looks like half of the I-toothpick structure. a(n) is also the number of toothpicks after the n-th. - Omar E. Pol, Mar 13 2011
Version "Quarter-circle" (or Q-toothpick): a(n) is also the number of Q-toothpicks after the n-th stage in a Q-toothpick structure in the first quadrant. We start from (0,1) with the first Q-toothpick centered at (1, 1). The structure is asymmetric. For a similar structure but starting from (0, 0) see A187212. See A187210 and A187220 for more information. - Omar E. Pol, Mar 22 2011
Version "Tree": It appears that a(n) is also the number of toothpicks after the n-th stage in a toothpick structure constructed following a special rule: the toothpicks of the new generation have length 4 when they are placed on the infinite square grid (note that every toothpick has four components of length 1), but after every stage, one (or two) of the four components of every toothpick of the new generation is removed, if such component contains an endpoint of the toothpick and if such endpoint is touching the midpoint or the endpoint of another toothpick. The truncated endpoints of the toothpicks remain exposed forever. Note that there are three sizes of toothpicks in the structure: toothpicks of lengths 4, 3 and 2. A159795 gives the total number of components in the structure after the n-th stage. A153006 (the corner sequence of the original version) gives 1/4 of the total of components in the structure after the n-th stage. - Omar E. Pol, Oct 24 2011
From Omar E. Pol, Sep 16 2012: (Start)
It appears that a(n)/A147614(n) converges to 3/4.
It appears that a(n)/A160124(n) converges to 3/2.
It appears that a(n)/A139252(n) converges to 3.
Also:
It appears that A147614(n)/A160124(n) converges to 2.
It appears that A160124(n)/A139252(n) converges to 2.
It appears that A147614(n)/A139252(n) converges to 4.
(End)
It appears that a(n) is also the total number of ON cells after n-th stage in a quadrant of the structure of the cellular automaton described in A169707 plus the total number of ON cells after n+1 stages in a quadrant of the mentioned structure, without its central cell. See the illustration of the NW-NE-SE-SW version in A169707. See also the connection between A160164 and A169707. - Omar E. Pol, Jul 26 2015
On the infinite Cairo pentagonal tiling consider the symmetric figure formed by two non-adjacent pentagons connected by a line segment joining two trivalent nodes. At stage 1 we start with one of these figures turned ON. The rule for the next stages is that the concave part of the figures of the new generation must be adjacent to the complementary convex part of the figures of the old generation. a(n) gives the number of figures that are ON in the structure after n-th stage. A160164(n) gives the number of ON cells in the structure after n-th stage. - Omar E. Pol, Mar 29 2018
From Omar E. Pol, Mar 06 2019: (Start)
The "word" of this sequence is "ab". For further information about the word of cellular automata see A296612.
Version "triangular grid": a(n) is also the total number of toothpicks of length 2 after n-th stage in the toothpick structure on the infinite triangular grid, if we use only two of the three axes. Otherwise, if we use the three axes, so we have the sequence A296510 which has word "abc".
The normal toothpick structure can be considered a superstructure of the Ulam-Warburton celular automaton since A147562(n) equals here the total number of "hidden crosses" after 4*n stages, including the central cross (beginning to count the crosses when their "nuclei" are totally formed with 4 quadrilaterals). Note that every quadrilateral in the structure belongs to a "hidden cross".
Also, the number of "hidden crosses" after n stages equals the total number of "flowers with six petals" after n-th stage in the structure of A323650, which appears to be a "missing link" between this sequence and A147562.
Note that the location of the "nuclei of the hidden crosses" is very similar (essentially the same) to the location of the "flowers with six petals" in the structure of A323650 and to the location of the "ON" cells in the version "one-step bishop" of the Ulam-Warburton cellular automaton of A147562. (End)
From Omar E. Pol, Nov 27 2020: (Start)
The simplest substructures are the arms of the hidden crosses. Each closed region (square or rectangle) of the structure belongs to one of these arms. The narrow arms have regions of area 1, 2, 4, 8, ... The broad arms have regions of area 2, 4, 8, 16 , ... Note that after 2^k stages, with k >= 3, the narrow arms of the main hidden crosses in each quadrant frame the size of the toothpick structure after 2^(k-1) stages.
Another kind of substructure could be called "bar chart" or "bar graph". This substructure is formed by the rectangles and squares of width 2 that are adjacent to any of the four sides of the toothpick structure after 2^k stages, with k >= 2. The height of these successive regions gives the first 2^(k-1) - 1 terms from A006519. For example: if k = 5 the respective heights after 32 stages are [1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1]. The area of these successive regions gives the first 2^(k-1) - 1 terms of A171977. For example: if k = 5 the respective areas are [2, 4, 2, 8, 2, 4, 2, 16, 2, 4, 2, 8, 2, 4, 2].
For a connection to Mersenne primes (A000668) and perfect numbers (A000396) see A153006.
For a representation of the Wagstaff primes (A000979) using the toothpick structure see A194810.
For a connection to stained glass windows and a hidden curve see A336532. (End)
It appears that the graph of a(n) bears a striking resemblance to the cumulative distribution function F(x) for X the random variable taking values in [0,1], where the binary expansion of X is given by a sequence of independent coin tosses with probability 3/4 of being 1 at each bit. It appears that F(n/2^k)*(2^(2k+1)+1)/3 approaches a(n) for k large. - James Coe, Jan 10 2022

Examples

			a(10^10) = 52010594272060810683. - _David A. Corneth_, Mar 26 2015
		

References

  • 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.

Crossrefs

Programs

  • Maple
    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;
  • Mathematica
    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 *)
  • PARI
    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
    
  • PARI
    \\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
    
  • Python
    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

Formula

a(2^k) = A007583(k), if k >= 0.
a(2^k-1) = A006095(k+1), if k >= 1.
a(A000225(k)) - a((A000225(k)-1)/2) = A006516(k), if k >= 1.
a(A000668(k)) - a((A000668(k)-1)/2) = A000396(k), if k >= 1.
G.f.: (x/((1-x)*(1+2*x))) * (1 + 2*x*Product_{k>=0} (1 + x^(2^k-1) + 2*x^(2^k))). - N. J. A. Sloane, May 20 2009, Jun 05 2009
One can show that lim sup a(n)/n^2 = 2/3, and it appears that lim inf a(n)/n^2 is 0.451... - Benoit Jubin, Apr 15 2009 and Jan 29 2010, N. J. A. Sloane, Jan 29 2010
Observation: a(n) == 3 (mod 4) for n >= 2. - Jaume Oliver Lafont, Feb 05 2009
a(2^k-1) = A000969(2^k-2), if k >= 1. - Omar E. Pol, Feb 13 2010
It appears that a(n) = (A187220(n+1) - 1)/2. - Omar E. Pol, Mar 08 2011
a(n) = 4*A153000(n-2) + 3, if n >= 2. - Omar E. Pol, Oct 01 2011
It appears that a(n) = A160552(n) + (A169707(n) - 1)/2, n >= 1. - Omar E. Pol, Feb 15 2015
It appears that a(n) = A255747(n) + A255747(n-1), n >= 1. - Omar E. Pol, Mar 16 2015
Let n = msb(n) + j where msb(n) = A053644(n) and let a(0) = 0. Then a(n) = (2 * msb(n)^2 + 1)/3 + 2 * a(j) + a(j+1) - 1. - David A. Corneth, Mar 26 2015
It appears that a(n) = (A169707(n) - 1)/4 + (A169707(n+1) - 1)/4, n >= 1. - Omar E. Pol, Jul 24 2015

Extensions

Verified and extended, a(49)-a(53), using the given PARI code by M. F. Hasler, Apr 14 2009
Further edited by N. J. A. Sloane, Jan 28 2010

A187220 Gullwing sequence (see Comments lines for precise definition).

Original entry on oeis.org

0, 1, 3, 7, 15, 23, 31, 47, 71, 87, 95, 111, 135, 159, 191, 247, 311, 343, 351, 367, 391, 415, 447, 503, 567, 607, 639, 695, 767, 847, 967, 1143, 1303, 1367, 1375, 1391, 1415, 1439, 1471, 1527, 1591, 1631, 1663, 1719, 1791, 1871, 1991, 2167, 2327, 2399, 2431
Offset: 0

Views

Author

Omar E. Pol, Mar 07 2011

Keywords

Comments

The Gullwing (or G-toothpick) sequence is a special type of toothpick sequence. It appears that this is a superstructure of A139250.
We define a "G-toothpick" to consist of two arcs of length Pi/2 forming a "gullwing" whose total length is equal to Pi = 3.141592...
A gullwing-shaped toothpick or G-toothpick or simply "gull" is formed by two Q-toothpicks (see A187210).
A G-toothpick has a midpoint and two endpoints. An endpoint is said to be "exposed" if it is not the midpoint or endpoint of any other G-toothpick.
The sequence gives the number of G-toothpicks in the structure after n stages. A187221 (the first differences) gives the number of G-toothpicks added at n-th stage.
a(n) is also the diameter of a circle whose circumference equals the total length of all gulls in the gullwing structure after n stages.
It appears that the gullwing pattern has a recursive, fractal-like structure. The animation shows the fractal-like behavior.
Note that the structure contains many different types of geometrical figures, for example: circles, hearts, etc. All figures are formed by arcs.
It appears that there are infinitely many types of circular shapes, which are related to the rectangles of the toothpick structure of A139250.
It also appears that the structure contains a nice pattern formed by distinct modular substructures: one central cross surrounded by several asymmetrical crosses (or "hidden crosses") of distinct sizes, and also several "nuclei" of crosses. This pattern is essentially similar to the crosses of A139250 but here the structure is harder to see. For example, consider the nucleus of a cross; in the toothpick structure a nucleus is formed by two squares and two rectangles but here a nucleus is formed by two circles and two hearts.
It appears furthermore that this structure has connections with the square-cross fractal and with the T-square fractal, just as in the case of the toothpick structure of A139250.
For more information see A139250 and A187210.
It appears this is also the connection between A147562 (the Ulam-Warburton cellular automaton) and the toothpick sequence A139250. The behavior of the function is similar to A147562 but here the structure is more complex. (see Plot 2 button: A147562 vs A187220). - Omar E. Pol, Mar 11 2011, Mar 13 2011
From Omar E. Pol, Mar 25 2011: (Start)
If we remove the first gull of the structure so we can see that there is a correspondence between the gullwing structure and the I-toothpick structure of A139250, for example: a pair of opposite gulls in horizontal position in the gullwing structure is equivalent to a vertical I-toothpick with length 4 in the I-toothpick structure, such that the midpoint of each horizontal gull coincides with the midpoint of each vertical toothpick of the I-toothpick. See A160164.
Also, B-toothpick sequence. We define a "B-toothpick" to consist of four arcs of length Pi/2 forming a "bell" similar to the Gauss function. A Bell-shaped toothpick or B-toothpick or simply "bell" is formed by four Q-toothpicks (see A187210). A B-toothpick has length 2*Pi. The sequence gives the number of B-toothpicks in the structure after n stages.
Also, if we remove the first bell of the structure, we can find a correspondence between this structure and the I-toothpick structure of A139250. In this case, for example, a pair of opposite bells in horizontal position is equivalent to a vertical I-toothpick with length 8 in the I-toothpick structure, such that the midpoint of each horizontal bell coincides with the midpoint of each vertical toothpick of the I-toothpick. See A160164.
Also, for this sequence there is a third structure formed by isosceles right triangles since gulls or bells can be replaced by these triangles.
Note that the size of the gulls, bells and triangles can be adjusted such that two or three of these structures can be overlaid.
(End)
Also, it appears that if we let k=floor(log_2(n)), then for n >= 1, a(2^k) = (4^(k+1) + 5)/3 - 2^(k+1). Otherwise, a(n)=(4^(k+1) + 5)/3 + 8*A153006(n-1-2^k). - Christopher Hohl, Dec 19 2018

Examples

			On the infinite square grid we start at stage 0 with no G-toothpicks, so a(0) = 0.
At stage 1 we place a G-toothpick:
Midpoint : (0,-1)
Endpoints: (-1,0) and (1,0)
So a(1) = 1. There are two exposed endpoints.
At stage 2 we place two G-toothpicks:
Midpoint of the left G-toothpick : (-1,0)
Endpoints of the left G-toothpick: (-2,1) and (-2,-1)
Midpoint of the right G-toothpick : (1,0)
Endpoints of the right G-toothpick: (2,1) and (2,-1)
So a(2) = 1+2 = 3. There are four exposed endpoints.
And so on...
		

Crossrefs

Programs

  • Mathematica
    Join[{0, 1}, Rest[CoefficientList[Series[(2 x / ((1 - x) (1 + 2 x))) (1+2 x Product[1 + x^(2^k - 1) + 2 x^(2^k), {k, 0, 20}]), {x, 0, 53}], x] + 1 ]] (* Vincenzo Librandi, Jul 02 2017 *)
  • PARI
    A139250(n) = my(msb(m) = 2^(#binary(m)-1), k = (2*msb(n)^2 + 1) / 3); if(n==msb(n), k , k + 2*A139250(n-msb(n)) + A139250(n - msb(n) + 1) - 1)
    a(n) = if(n<2, n, 1 + 2*A139250(n-1)) \\ Iain Fox, Dec 10 2018
  • Python
    def msb(n):
        t=0
        while n>>t>0: t+=1
        return 2**(t - 1)
    def a139250(n):
        k=(2*msb(n)**2 + 1)//3
        return 0 if n==0 else k if n==msb(n) else k + 2*a139250(n - msb(n)) + a139250(n - msb(n) + 1) - 1
    def a(n): return 0 if n==0 else 1 + 2*a139250(n - 1)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 01 2017
    

Formula

a(n) = 1 + 2*A139250(n-1), for n >= 1.
a(n) = 1 + A160164(n-1), for n >= 1. - [Suggested by Omar E. Pol, Mar 13 2011, proved by Nathaniel Johnston, Mar 22 2011]
The formula involving A160164 can be seen by identifying a Gullwing in the n-th generation (n >= 2) with midpoint at (x,y) and endpoints at (x-1,y+1) and (x+1,y+1) with a toothpick in the (n-1)st generation with endpoints at (x,y-1) and (x,y+1) -- this toothpick from (x,y-1) to (x,y+1) should be considered as having length ONE (i.e., it is HALF of an I-toothpick). The formula involving A139250 follows as a result of the relationship between A139250 and A160164.
a(n) = A147614(n-1) + A160124(n-1), n >= 2. - Omar E. Pol, Feb 15 2013
a(n) = 7 + 8*A153000(n-3), n >= 3. - Omar E. Pol, Feb 16 2013

A139252 Number of segments needed to draw the toothpick structure of A139250 as it is after n stages.

Original entry on oeis.org

0, 1, 3, 5, 7, 11, 15, 17, 19, 23, 27, 31, 39, 51, 59, 61, 63, 67, 71, 75, 83, 95, 103, 107, 115, 127, 139, 155, 183, 215, 231, 233, 235, 239, 243, 247, 255, 267, 275, 279, 287, 299, 311, 327, 355, 387, 403, 407, 415
Offset: 0

Views

Author

Omar E. Pol, May 17 2008

Keywords

Comments

Contribution from Omar E. Pol, Sep 16 2012 (Start):
It appears that A147614(n)/a(n) converge to 4.
It appears that A139250(n)/a(n) converge to 3.
It appears that A160124(n)/a(n) converge to 2.
(End)

Examples

			For n = 3, after three stages the toothpick structure of A139250 contains seven toothpicks (A139250(3) = 7), however the toothpick structure can be essentially represented by five segments, so a(3) = 5. - _Omar E. Pol_, Sep 16 2012
		

Crossrefs

Extensions

Terms after a(28) from Nathaniel Johnston, Mar 29 2011

A147614 a(n) = number of grid points that are covered after n-th stage of A139250, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 3, 7, 13, 19, 27, 39, 53, 63, 71, 83, 99, 119, 147, 183, 217, 235, 243, 255, 271, 291, 319, 355, 391, 419, 447, 487, 539, 607, 699, 803, 885, 919, 927, 939, 955, 975, 1003, 1039, 1075, 1103, 1131, 1171, 1223, 1291, 1383, 1487, 1571, 1615
Offset: 0

Views

Author

David Applegate, Apr 29 2009

Keywords

Comments

a(n) is also the number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton whose virtual skeleton is a polyedge as the toothpick structure of A139250. [From Omar E. Pol, May 18 2009]
It appears that the number of grid points that are covered after n-th stage of A139250, assuming the toothpicks have length 2*k, is equal to (2*k-2) * A139250(n) + a(n), k>0. See formulas in A160420 and A160422. [From Omar E. Pol, Nov 15 2010]
More generally, it appears that a(n) is also the number of grid points that are covered by the "special points" of the toothpicks of A139250, after n-th stage, assuming the toothpicks have length 2*k, k>0 and that each toothpick has three special points: the midpoint and two endpoints.
Note that if k>1 then also there are 2*k-2 grid points that are covered by each toothpick, but these points are not considered for this sequence. [From Omar E. Pol, Nov 15 2010]
Contribution from Omar E. Pol, Sep 16 2012 (Start):
It appears that a(n)/A139250(n) converge to 4/3.
It appears that a(n)/A160124(n) converge to 2.
It appears that a(n)/A139252(n) converge to 4.
(End)

Crossrefs

Formula

Since A160124(n) = 1+2*A139250(n)-A147614(n), n>0 (see A160124), and we have recurrences for A160125 (hence A160124) and A139250, we have a recurrence for this sequence. - N. J. A. Sloane, Feb 02 2010
a(n) = A187220(n+1)-A160124(n), n>0. - Omar E. Pol, Feb 15 2013

A335703 Number of regions after n generations of symmetrized Conant Gasket.

Original entry on oeis.org

1, 2, 3, 5, 9, 16, 30, 52, 95, 174, 326, 618, 1195, 2300, 4478, 8764, 17251, 34038, 67326, 133858, 266331, 530876, 1058146, 2112904, 4216075, 8417830, 16808282, 33592910, 67130923, 134211556, 268281390, 536403988, 1072424939, 2144322638, 4287655814, 8574721850
Offset: 0

Views

Author

Rémy Sigrist and N. J. A. Sloane, Aug 25 2020

Keywords

Comments

Generation 0. Start with a square of side 1
Generation 1. Go to bottom edge of the square, and at the point 1/2 draw a vertical line from bottom to top.
Generation 2. Go to the left edge, and at the point 1/2 draw a line from left to right. Stop when you reach the vertical line.
Generation 3. Go to the top edge and draw downward vertical lines at the 1/4 and 3/4 points. If you reach a horizontal line, lift the pen, skip to the next horizontal line and lower the pen. Repeat until reaching the bottom edge.
Generation 4. Go to the right edge and draw horizontal lines at the 1/4 and 3/4 points. If you reach a vertical line, lift the pen, skip to the next vertical line and lower the pen. Repeat until reaching the left edge.
Generation 5. Return to the bottom edge and draw vertical lines at the 1/8, 3/8, 5/8, and 7/8 points. If you reach a horizontal line, lift the pen, skip to the next horizontal line and lower the pen. Repeat until reaching the top edge.
Generation 6. Return to the left edge and draw horizontal lines at the points 1/8, 3/8, 5/8, 7/8, following the same rules.
Continue in this way, visiting each side in turn.
At generations 2k-1 and 2k, the lines start at the points 1/2^k, 3/2^k, 5/2^k, ..., (2^k-1)/2^k.
The tick marks on the edges of the illustrations indicate which side of the square the lines start from.
This is similar to Conant's Gasket as described in A328078, except there lines were drawn alternately from the bottom and left edges of the square, which led to a figure with a strong bias to the North-East (see Robert Fathauer's colored illustration in A328078 of the gasket after 16 generations).
The present definition produces a more homogeneous design, although now there is no obvious fractal structure.

Crossrefs

For bisections see A337267 and A337268. See also A337269.

Extensions

a(34)-a(35) from N. J. A. Sloane, Sep 06 2020 using Rémy Sigrist's C++ program.

A161828 Number of rhombuses in the Y-toothpick structure of A160120 after n rounds.

Original entry on oeis.org

0, 0, 3, 3, 9, 9, 15, 21, 33, 39
Offset: 0

Views

Author

Omar E. Pol, Jun 21 2009

Keywords

Crossrefs

A160125 Number of squares and rectangles that are created at the n-th stage in the toothpick structure (see A139250).

Original entry on oeis.org

0, 0, 2, 2, 0, 4, 10, 6, 0, 4, 8, 4, 4, 20, 30, 14, 0, 4, 8, 4, 4, 20, 28, 12, 4, 16, 20, 12, 28, 72, 78, 30, 0, 4, 8, 4, 4, 20, 28, 12, 4, 16, 20, 12, 28, 72, 76, 28, 4, 16, 20, 12, 28, 68, 68, 28, 24, 52, 52, 52, 128, 224, 190, 62, 0, 4, 8, 4, 4, 20, 28, 12, 4, 16, 20, 12, 28, 72
Offset: 1

Views

Author

Omar E. Pol, May 03 2009

Keywords

Crossrefs

First differences of A160124.
Cf. toothpick sequence A139250.

Programs

  • Maple
    # First construct A168131:
    w := proc(n) option remember; local k,i;
    if (n=0) then RETURN(0)
    elif (n <= 3) then RETURN(n-1)
    else
    k:=floor(log(n)/log(2)); i:=n-2^k;
    if (i=0) then RETURN(2^(k-1)-1)
    elif (i<2^k-2) then RETURN(2*w(i)+w(i+1));
    elif (i=2^k-2) then RETURN(2*w(i)+w(i+1)+1);
    else RETURN(2*w(i)+w(i+1)+2);
    fi; fi; end;
    # Then construct A160125:
    r := proc(n) option remember; local k,i;
    if (n<=2) then RETURN(0)
    elif (n <= 4) then RETURN(2)
    else
    k:=floor(log(n)/log(2)); i:=n-2^k;
    if (i=0) then RETURN(2^k-2)
    elif (i<=2^k-2) then RETURN(4*w(i));
    else RETURN(4*w(i)+2);
    fi; fi; end;
    [seq(r(n),n=0..200)];
    # N. J. A. Sloane, Feb 01 2010
  • Mathematica
    w [n_] := w[n] = Module[{k, i}, Which[n == 0, 0, n <= 3, n - 1, True, k = Floor[Log[2, n]]; i = n - 2^k; Which[i == 0, 2^(k - 1) - 1, i < 2^k - 2, 2 w[i] + w[i + 1], i == 2^k - 2, 2 w[i] + w[i + 1] + 1, True, 2 w[i] + w[i + 1] + 2]]];
    r[n_] := r[n] = Module[{k, i}, Which[n <= 2, 0, n <= 4, 2, True, k = Floor[Log[2, n]]; i = n - 2^k; Which[i == 0, 2^k - 2, i <= 2^k - 2, 4 w[i], True, 4 w[i] + 2]]];
    Array[r, 78] (* Jean-François Alcover, Apr 15 2020, from Maple *)

Formula

See Maple program for recurrence.

Extensions

Terms beyond a(10) from R. J. Mathar, Jan 21 2010

A211012 Total area of all squares and rectangles after 2^n stages in the toothpick structure of A139250, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 8, 48, 224, 960, 3968, 16128, 65024, 261120, 1046528, 4190208, 16769024, 67092480, 268402688, 1073676288, 4294836224, 17179607040, 68718952448, 274876858368, 1099509530624, 4398042316800, 17592177655808, 70368727400448, 281474943156224
Offset: 0

Views

Author

Omar E. Pol, Sep 21 2012

Keywords

Comments

All internal regions in the toothpick structure are squares and rectangles. The area of every internal region is a power of 2.
Similar to A271061. - Robert Price, Mar 30 2016
For n=3,5,..., also the number of minimum vertex colorings in the n-sunlet graph. - Eric W. Weisstein, Mar 03 2024

Examples

			For n = 3 the area of all squares and rectangles in the toothpick structure after 2^3 stages equals the area of a rectangle of size 8X6, so a(3) = 8*6 = 48.
		

Crossrefs

Row sums of triangle A211017, n>=1.

Programs

  • PARI
    concat(vector(2), Vec(8*x^2/((1-2*x)*(1-4*x)) + O(x^50))) \\ Colin Barker, Mar 30 2016

Formula

a(n) = 2^n * (2^n-2) = A000079(n)*(A000079(n) - 2) = A159786(2^n) = 8*A006516(n-1), n>=1.
From Colin Barker, Mar 30 2016: (Start)
G.f.: 8*x^2 / ((1-2*x)*(1-4*x)).
a(n) = 6*a(n-1)-8*a(n-2) for n>2. (End)
E.g.f.: (1 - exp(2*x))^2. - Stefano Spezia, Mar 12 2025

A211008 Triangle read by rows: T(n,k) = number of squares and rectangles of area 2^(k-1) after n-th stage in the toothpick structure of A139250, n>=1, k>=1, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 0, 2, 0, 4, 0, 4, 4, 4, 8, 8, 2, 8, 12, 4, 8, 12, 4, 12, 12, 4, 16, 16, 4, 16, 20, 4, 20, 20, 4, 32, 28, 4, 40, 44, 8, 2, 40, 52, 12, 4, 40, 52, 12, 4, 44, 52, 12, 4, 48, 56, 12, 4, 48, 60, 12, 4, 52, 60, 12, 4, 64, 68, 12, 4, 72, 84, 16, 4
Offset: 1

Views

Author

Omar E. Pol, Sep 18 2012

Keywords

Comments

It appears that the number of rectangles of area 2 in the toothpick structure of A139250 equals the number of hearts in the Q-toothpick cellular automaton of A187210. See conjecture in formula section.

Examples

			For n = 8 in the toothpick structure after 8 stages we have that:
T(8,1) = 8 is the number of squares of size 1 X 1.
T(8,2) = 12 is the number of rectangles of size 1 X 2.
T(8,3) = 4 is the number of squares of size 2 X 2.
Written as an irregular array the sequence begins:
   0;
   0;
   0,  2;
   0,  4;
   0,  4;
   4,  4;
   8,  8,  2;
   8, 12,  4;
   8, 12,  4;
  12, 12,  4;
  16, 16,  4;
  16, 20,  4;
  20, 20,  4;
  32, 28,  4;
  40, 44,  8,  2;
  40, 52, 12,  4;
		

Crossrefs

Zero together with the row sums gives A160124.

Formula

It appears that T(n,2) = A188346(n+2) (checked by hand up to n = 128 in the toothpick structure of A139250).

A211016 Triangle read by rows: T(n,k) = number of squares and rectangles of area 2^(k-1) after 2^n stages in the toothpick structure of A139250, n>=1, k>=1, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 4, 8, 12, 4, 40, 52, 12, 4, 168, 212, 52, 12, 4, 680, 852, 212, 52, 12, 4, 2728, 3412, 852, 212, 52, 12, 4, 10920, 13652, 3412, 852, 212, 52, 12, 4, 43688, 54612, 13652, 3412, 852, 212, 52, 12, 4, 174760, 218452, 54612, 13652, 3412, 852, 212, 52, 12, 4
Offset: 1

Views

Author

Omar E. Pol, Sep 18 2012

Keywords

Comments

All internal regions in the toothpick structure are squares and rectangles.

Examples

			For n = 5 in the toothpick structure after 2^5 stages we have that:
T(5,1) = 168 is the number of squares of size 1 X 1.
T(5,2) = 212 is the number of rectangles of size 1 X 2.
T(5,3) = 52 is the total number of squares of size 2 X 2 and of rectangles of size 1 X 4.
T(5,4) = 12 is the number of rectangles of size 2 X 4.
T(5,5) = 4 is the number of rectangles of size 2 X 8.
Triangle begins:
       0;
       0,      4;
       8,     12,     4;
      40,     52,    12,     4;
     168,    212,    52,    12,    4;
     680,    852,   212,    52,   12,   4;
    2728,   3412,   852,   212,   52,  12,   4;
   10920,  13652,  3412,   852,  212,  52,  12,  4;
   43688,  54612, 13652,  3412,  852, 212,  52, 12,  4;
  174760, 218452, 54612, 13652, 3412, 852, 212, 52, 12, 4;
		

Crossrefs

Row sums give 0 together with A145655.

Formula

T(n,k) = A211008(2^n,k) = 4*A211019(n,k).
T(n,1) = 4*A020988(n-2), n>=2.
Showing 1-10 of 20 results. Next