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 25 results. Next

A169708 First differences of A169707.

Original entry on oeis.org

1, 4, 4, 12, 4, 12, 20, 28, 4, 12, 20, 28, 20, 44, 68, 60, 4, 12, 20, 28, 20, 44, 68, 60, 20, 44, 68, 76, 84, 156, 196, 124, 4, 12, 20, 28, 20, 44, 68, 60, 20, 44, 68, 76, 84, 156, 196, 124, 20, 44, 68, 76, 84, 156, 196, 140, 84, 156, 212, 236, 324, 508, 516, 252, 4, 12, 20, 28, 20
Offset: 0

Views

Author

N. J. A. Sloane, Apr 17 2010

Keywords

Examples

			From _Omar E. Pol_, Feb 13 2015: (Start)
Written as an irregular triangle in which row lengths are 1,1,2,4,8,16,32,... the sequence begins:
1;
4;
4,12;
4,12,20,28;
4,12,20,28,20,44,68,60;
4,12,20,28,20,44,68,60,20,44,68,76,84,156,196,124;
4,12,20,28,20,44,68,60,20,44,68,76,84,156,196,124,20,44,68,76,84,156,196,140,84,156,212,236,324,508,516,252;
It appears that the row sums give A000302.
It appears that the right border gives A173033.
(End)
		

Crossrefs

Formula

It appears that a(n) = 4*A160552(n), n >= 1. - Omar E. Pol, Feb 13 2015

Extensions

Initial 1 added by Omar E. Pol, Feb 13 2015

A255366 Total number of ON cells at stage n of two-dimensional cellular automaton defined by the rules of the "Ulam-Warburton" two-dimensional cellular automaton (A147562) for two of its wedges and defined by "Rule 750" using the von Neumann neighborhood (A169707) for the two other wedges.

Original entry on oeis.org

1, 5, 9, 21, 25, 37, 53, 85, 89, 101, 117, 149, 165, 205, 257, 341, 345, 357, 373, 405, 421, 461, 513, 597, 613, 653, 705, 797, 857, 989, 1141, 1365, 1369, 1381, 1397, 1429, 1445, 1485, 1537, 1621, 1637, 1677, 1729, 1821, 1881, 2013, 2165, 2389, 2405, 2445, 2497
Offset: 1

Views

Author

Omar E. Pol, Feb 21 2015

Keywords

Comments

First differs from A162795 at a(14), but it appears that then they share infinitely many terms. It appears that this is very close to A162795 rather than both A147562 and A169707.
The graphs of both A162795 and this sequence are intertwined.
Note that there are four main versions of this cellular automaton, depending on whether the wedges with the same rule are opposite or perpendicular and also depending on whether each mentioned version is represented by the "one-step rook" illustration or by the "one-step bishop" illustration. The four versions are represented by this sequence.
a(43) = 1729 is also the Hardy-Ramanujan number.

Examples

			a(43) = (1705 + 1753)/2 = 3458/2 = 1729.
		

Crossrefs

Formula

a(n) = (A147562(n) + A169707(n))/2.
It appears that a(n) = A147562(n) = A162795(n) = A169709(n), if n is a member of A048645, or in other words: if the binary weight of n is 1 or 2, but note that a(n) = A162795(n) for many other values of n.

A253098 Partial sums of A169707.

Original entry on oeis.org

1, 6, 15, 36, 61, 98, 155, 240, 329, 430, 551, 700, 869, 1082, 1363, 1704, 2049, 2406, 2783, 3188, 3613, 4082, 4619, 5216, 5833, 6494, 7223, 8028, 8917, 9962, 11203, 12568, 13937, 15318, 16719, 18148, 19597, 21090, 22651, 24272, 25913, 27598, 29351, 31180, 33093, 35162, 37427
Offset: 0

Views

Author

N. J. A. Sloane, Feb 16 2015

Keywords

Comments

Also, total number of cubic ON cells after n generations in a three-dimensional cellular automaton in which A169707(n) gives the number of cubic ON cells in the n-th level of the structure starting from the top. The structure looks like an irregular stepped pyramid. Note that there are two versions of this pyramid because there are two versions of the structure of the cellular automaton of A169707. - Omar E. Pol, Feb 17 2015

Crossrefs

Cf. A169707.

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

A147562 Number of "ON" cells at n-th stage in the "Ulam-Warburton" two-dimensional cellular automaton.

Original entry on oeis.org

0, 1, 5, 9, 21, 25, 37, 49, 85, 89, 101, 113, 149, 161, 197, 233, 341, 345, 357, 369, 405, 417, 453, 489, 597, 609, 645, 681, 789, 825, 933, 1041, 1365, 1369, 1381, 1393, 1429, 1441, 1477, 1513, 1621, 1633, 1669, 1705, 1813, 1849, 1957, 2065, 2389, 2401, 2437, 2473
Offset: 0

Views

Author

N. J. A. Sloane, based on emails from Franklin T. Adams-Watters, R. J. Mathar and David W. Wilson, Apr 29 2009

Keywords

Comments

Studied by Holladay and Ulam circa 1960. See Fig. 1 and Example 1 of the Ulam reference. - N. J. A. Sloane, Aug 02 2009.
Singmaster calls this the Ulam-Warburton cellular automaton. - N. J. A. Sloane, Aug 05 2009
On the infinite square grid, start with all cells OFF.
Turn a single cell to the ON state.
At each subsequent step, each cell with exactly one neighbor ON is turned ON, and everything that is already ON remains ON.
Here "neighbor" refers to the four adjacent cells in the X and Y directions.
Note that "neighbor" could equally well refer to the four adjacent cells in the diagonal directions, since the graph formed by Z^2 with "one-step rook" adjacencies is isomorphic to Z^2 with "one-step bishop" adjacencies.
Also toothpick sequence starting with a central X-toothpick followed by T-toothpicks (see A160170 and A160172). The sequence gives the number of polytoothpicks in the structure after n-th stage. - Omar E. Pol, Mar 28 2011
It appears that this sequence shares infinitely many terms with both A162795 and A169707, see Formula section and Example section. - Omar E. Pol, Feb 20 2015
It appears that the positive terms are also the odd terms (a bisection) of A151920. - Omar E. Pol, Mar 06 2015
Also, the number of active (ON, black) cells in the n-th stage of growth of two-dimensional cellular automaton defined by Wolfram's "Rule 558" or "Rule 686" based on the 5-celled von Neumann neighborhood. - Robert Price, May 10 2016
From Omar E. Pol, Mar 05 2019: (Start)
a(n) is also the total number of "hidden crosses" after 4*n stages in the toothpick structure of A139250, including the central cross, beginning to count the crosses when their nuclei are totally formed with 4 quadrilaterals.
a(n) is also the total number of "flowers with six petals" after 4*n stages in the toothpick structure of A323650.
Note that the location of the "nuclei of the hidden crosses" and the "flowers with six petals" in both toothpick structures is essentially the same as the location of the "ON" cells in the version "one-step bishop" of this sequence (see the illustration of initial terms, figure 2). (End)
This sequence has almost exactly the same graph as A187220, A162795, A169707 and A160164 which is twice A139250. - Omar E. Pol, Jun 18 2022

Examples

			If we label the generations of cells turned ON by consecutive numbers we get a rosetta cell pattern:
. . . . . . . . . . . . . . . . .
. . . . . . . . 4 . . . . . . . .
. . . . . . . 4 3 4 . . . . . . .
. . . . . . 4 . 2 . 4 . . . . . .
. . . . . 4 3 2 1 2 3 4 . . . . .
. . . . . . 4 . 2 . 4 . . . . . .
. . . . . . . 4 3 4 . . . . . . .
. . . . . . . . 4 . . . . . . . .
. . . . . . . . . . . . . . . . .
In the first generation, only the central "1" is ON, a(1)=1. In the next generation, we turn ON four "2", leading to a(2)=a(1)+4=5. In the third generation, four "3" are turned ON, a(3)=a(2)+4=9. In the fourth generation, each of the four wings allows three 4's to be turned ON, a(4)=a(3)+4*3=21.
From _Omar E. Pol_, Feb 18 2015: (Start)
Also, written as an irregular triangle T(j,k), j>=0, k>=1, in which the row lengths are the terms of A011782:
1;
5;
9,   21;
25,  37, 49, 85;
89, 101,113,149,161,197,233,341;
345,357,369,405,417,453,489,597,609,645,681,789,825,933,1041,1365;
...
The right border gives the positive terms of A002450.
(End)
It appears that T(j,k) = A162795(j,k) = A169707(j,k), if k is a power of 2, for example: it appears that the three mentioned triangles only share the elements from the columns 1, 2, 4, 8, 16, ... - _Omar E. Pol_, Feb 20 2015
		

References

  • S. Ulam, On some mathematical problems connected with patterns of growth of figures, pp. 215-224 of R. E. Bellman, ed., Mathematical Problems in the Biological Sciences, Proc. Sympos. Applied Math., Vol. 14, Amer. Math. Soc., 1962.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 928.

Crossrefs

Programs

  • Maple
    Since this is the partial sum sequence of A147582, it is most easily obtained using the Maple code given in A147582.
    # [x,y] coordinates of cells on
    Lse := [[0,0]] ;
    # enclosing rectangle of the cells on (that is, minima and maxima in Lse)
    xmin := 0 ;
    xmax := 0 ;
    ymin := 0 ;
    ymax := 0 ;
    # count neighbors of x,y which are on; return 0 if [x,y] is in L
    cntnei := proc(x,y,L)
    local a,p,xpt,ypt;
    a := 0 ;
    if not [x,y] in L then
    for p in Lse do
    xpt := op(1,p) ;
    ypt := op(2,p) ;
    if ( abs(xpt-x) = 1 and ypt=y ) or ( x=xpt and abs(ypt-y) = 1) then
    a := a+1 ;
    fi;
    od:
    fi:
    RETURN(a) ;
    end:
    # loop over generations/steps
    for stp from 1 to 10 do
    Lnew := [] ;
    for x from xmin-1 to xmax+1 do
    for y from ymin-1 to ymax+1 do
    if cntnei(x,y,Lse) = 1 then
    Lnew := [op(Lnew),[x,y]] ;
    fi;
    od:
    od:
    for p in Lnew do
    xpt := op(1,p) ;
    ypt := op(2,p) ;
    xmin := min(xmin,xpt) ;
    xmax := max(xmax,xpt) ;
    ymin := min(ymin,ypt) ;
    ymax := max(ymax,ypt) ;
    od:
    Lse := [op(Lse),op(Lnew)] ;
    print(nops(Lse)) ;
  • Mathematica
    Join[{0},Map[Function[Apply[Plus,Flatten[ #1]]],CellularAutomaton[{686,{2,{{0,2,0},{2,1,2},{0,2,0}}},{1,1}},{{{1}},0},200]]] (* Nadia Heninger and N. J. A. Sloane, Aug 11 2009; modified by Paolo Xausa, Aug 12 2022 to include the a(0) term *)
    ArrayPlot /@ CellularAutomaton[{686, {2, {{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}}, {1, 1}}, {{{1}}, 0}, 16] (* N. J. A. Sloane, Nov 08 2014 *)
    A147562list[nmax_]:=Accumulate[Join[{0,1},4*3^(DigitCount[Range[nmax-1],2,1]-1)]];A147562list[100] (* Paolo Xausa, May 21 2023 *)
  • PARI
    a(n) = if (n, 1 + 4*sum(k=1, n-1, 3^(hammingweight(k)-1)), 0); \\ Michel Marcus, Jul 05 2022

Formula

a(n) = 1 + 4*Sum_{k=1..n-1} 3^(wt(k)-1) for n>1, where wt() = A000120(). [Corrected by Paolo Xausa, Aug 12 2022]
For asymptotics see the discussion in the comments in A006046. - N. J. A. Sloane, Mar 11 2021
From Omar E. Pol, Mar 13 2011: (Start)
a(n) = 2*A151917(n) - 1, for n >= 1.
a(n) = 1 + 4*A151920(n-2), for n >= 2.
(End)
It appears that a(n) = A162795(n) = A169707(n), if n is a member of A048645, otherwise a(n) < A162795(n) < A169707(n). - Omar E. Pol, Feb 20 2015
It appears that a(n) = A151920(2n-2), n >= 1. - Omar E. Pol, Mar 06 2015
It appears that a(n) = (A130665(2n-1) - 1)/3, n >= 1. - Omar E. Pol, Mar 07 2015
a(n) = 1 + 4*(A130665(n-1) - 1)/3, n >= 1. Omar E. Pol, Mar 07 2015
a(n) = A323650(2n)/3. - Omar E. Pol, Mar 04 2019

Extensions

Offset and initial terms changed by N. J. A. Sloane, Jun 07 2009
Numbers in the comment adapted to the offset by R. J. Mathar, Mar 03 2010

A048645 Integers with one or two 1-bits in their binary expansion.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 16, 17, 18, 20, 24, 32, 33, 34, 36, 40, 48, 64, 65, 66, 68, 72, 80, 96, 128, 129, 130, 132, 136, 144, 160, 192, 256, 257, 258, 260, 264, 272, 288, 320, 384, 512, 513, 514, 516, 520, 528, 544, 576, 640, 768, 1024, 1025, 1026, 1028, 1032
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

Apart from initial 1, sums of two not necessarily distinct powers of 2.
4 does not divide C(2s-1,s) (= A001700[ s ]) if and only if s=a(n).
Possible number of sides of a regular polygon such that there exists a triangulation where each triangle is isosceles. - Sen-peng Eu, May 07 2008
Also numbers n such that n!/2^(n-2) is an integer. - Michel Lagneau, Mar 28 2011
It appears these are also the indices of the terms that are shared by the cellular automata of A147562, A162795, A169707. - Omar E. Pol, Feb 21 2015
Numbers with binary weight 1 or 2. - Omar E. Pol, Feb 22 2015

Examples

			From _Omar E. Pol_, Feb 18 2015: (Start)
Also, written as a triangle T(j,k), k >= 1, in which row lengths are the terms of A028310:
   1;
   2;
   3,  4;
   5,  6,  8;
   9, 10, 12, 16;
  17, 18, 20, 24, 32;
  33, 34, 36, 40, 48, 64;
  65, 66, 68, 72, 80, 96, 128;
  ...
It appears that column 1 is A094373.
It appears that the right border gives A000079.
It appears that the first differences in every row that contains at least two terms give the first h-1 powers of 2, where h is the length of the row.
(End)
		

Crossrefs

Programs

  • Haskell
    import Data.List (insert)
    a048645 n k = a048645_tabl !! (n-1) !! (k-1)
    a048645_row n = a048645_tabl !! (n-1)
    a048645_tabl = iterate (\xs -> insert (2 * head xs + 1) $ map ((* 2)) xs) [1]
    a048645_list = concat a048645_tabl
    -- Reinhard Zumkeller, Dec 19 2012
    
  • Maple
    lincom:=proc(a,b,n) local i,j,s,m; s:={}; for i from 0 to n do for j from 0 to n do m:=a^i+b^j; if m<=n then s:={op(s),m} fi od; od; lprint(sort([op(s)])); end: lincom(2,2,1000); # Zerinvary Lajos, Feb 24 2007
  • Mathematica
    Select[Range[2000], 1 <= DigitCount[#, 2, 1] <= 2&] (* Jean-François Alcover, Mar 06 2016 *)
  • PARI
    isok(n) = my(hw = hammingweight(n)); (hw == 1) || (hw == 2); \\ Michel Marcus, Mar 06 2016
    
  • PARI
    a(n) = if(n <= 2, return(n), n-=2); my(c = (sqrtint(8*n + 1) - 1) \ 2); 1 << c + 1 << (n - binomial(c + 1, 2)) \\ David A. Corneth, Jan 02 2019
    
  • PARI
    nxt(n) = msb = 1 << logint(n, 2); if(n == msb, n + 1, t = n - msb; n + t) \\ David A. Corneth, Jan 02 2019
    
  • Python
    def ok(n): return 1 <= bin(n)[2:].count('1') <= 2
    print([k for k in range(1033) if ok(k)]) # Michael S. Branicky, Jan 22 2022
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        for d in count(0):
            msb = 2**d
            yield msb
            for lsb in range(d):
                yield msb + 2**lsb
    print(list(islice(agen(), 60))) # Michael S. Branicky, Jan 22 2022
    
  • Python
    from math import isqrt, comb
    def A048645(n): return (1<<(m:=isqrt(n-1<<3)+1>>1)-1)+(1<<(n-2-comb(m,2))) if n>1 else 1 # Chai Wah Wu, Oct 30 2024

Formula

a(0) = 1, a(n) = (2^(trinv(n-1)-1) + 2^((n-1)-((trinv(n-1)*(trinv(n-1)-1))/2))), i.e., 2^A003056(n) + 2^A002262(n-1) (the latter sequence contains the definition of trinv).
Let Theta = Sum_{k >= 0} x^(2^k). Then Sum_{n>=1} x^a(n) = (Theta^2 + Theta + x)/2. - N. J. A. Sloane, Jun 23 2009
As a triangle, for n > 1, 1 < k <= n: T(n,1) = A173786(n-2,n-2) and T(n,k) = A173786(n-1,k-2). - Reinhard Zumkeller, Feb 28 2010
It appears that A147562(a(n)) = A162795(a(n)) = A169707(a(n)). - Omar E. Pol, Feb 19 2015
Sum_{n>=1} 1/a(n) = 2 + A179951. - Amiram Eldar, Jan 22 2022

A162795 Total number of toothpicks in the toothpick structure A139250 that are parallel to the initial toothpick, after n odd rounds.

Original entry on oeis.org

1, 5, 9, 21, 25, 37, 53, 85, 89, 101, 117, 149, 165, 201, 261, 341, 345, 357, 373, 405, 421, 457, 517, 597, 613, 649, 709, 793, 853, 965, 1173, 1365, 1369, 1381, 1397, 1429, 1445, 1481, 1541, 1621, 1637, 1673, 1733, 1817, 1877, 1989, 2197, 2389, 2405, 2441, 2501
Offset: 1

Views

Author

Omar E. Pol, Jul 14 2009

Keywords

Comments

Partial sums of A162793.
Also, total number of ON cells at stage n of the two-dimensional cellular automaton defined as follows: replace every "vertical" toothpick of length 2 with a centered unit square "ON" cell, so we have a cellular automaton which is similar to both A147562 and A169707 (this is the "one-step bishop" version). For the "one-step rook" version we use toothpicks of length sqrt(2), then rotate the structure 45 degrees and then replace every toothpick with a unit square "ON" cell. For the illustration of the sequence as a cellular automaton we now have three versions: the original version with toothpicks, the one-step rook version and one-step bishop version. Note that the last two versions refer to the standard ON cells in the same way as the two versions of A147562 and the two versions of A169707. It appears that the graph of this sequence lies between the graphs of A147562 and A169707. Also, it appears that this sequence shares infinitely many terms with both A147562 and A169707, see Formula section and Example section. - Omar E. Pol, Feb 20 2015
It appears that this is also a bisection (the odd terms) of A255747.

Examples

			From _Omar E. Pol_, Feb 18 2015: (Start)
Written as an irregular triangle T(j,k), k>=1, in which the row lengths are the terms of A011782:
    1;
    5;
    9, 21;
   25, 37, 53, 85;
   89,101,117,149,165,201,261,341;
  345,357,373,405,421,457,517,597,613,649,709,793,853,965,1173,1365;
  ...
The right border gives the positive terms of A002450.
(End)
It appears that T(j,k) = A147562(j,k) = A169707(j,k), if k is a power of 2, for example: it appears that the three mentioned triangles only share the elements of the columns 1, 2, 4, 8, 16, ... - _Omar E. Pol_, Feb 20 2015
		

Crossrefs

Formula

It appears that a(n) = A147562(n) = A169707(n), if n is a term of A048645, otherwise A147562(n) < a(n) < A169707(n). - Omar E. Pol, Feb 20 2015
It appears that a(n) = (A169707(2n) - 1)/4 = A255747(2n-1). - Omar E. Pol, Mar 07 2015
a(n) = 1 + 4*A255737(n-1). - Omar E. Pol, Mar 08 2015

Extensions

More terms from N. J. A. Sloane, Dec 28 2009

A160164 Number of toothpicks after n-th stage in the I-toothpick structure of A139250.

Original entry on oeis.org

0, 2, 6, 14, 22, 30, 46, 70, 86, 94, 110, 134, 158, 190, 246, 310, 342, 350, 366, 390, 414, 446, 502, 566, 606, 638, 694, 766, 846, 966, 1142, 1302, 1366, 1374, 1390, 1414, 1438, 1470, 1526, 1590, 1630, 1662, 1718, 1790
Offset: 0

Views

Author

Omar E. Pol, Jun 01 2009

Keywords

Comments

From Omar E. Pol, Mar 12 2011, Mar 15 2011, Mar 22 2011, Mar 25 2011: (Start)
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.
Note that in the physical model of the toothpick structure of A139250 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.
a(n) is also the number of components after n-th stage in the toothpick structure of A139250, assuming the toothpicks have length 2.
Also, gullwing sequence starting from two opposite "gulls" (as a reflected gull in flight) such that the distance between their midpoints is equal to 2 (See A187220). The sequence gives the number of gulls in the structure after n-th stage.
Note that there is a correspondence between the gullwing structure and the I-toothpick structure, 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.
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 A160164. See also A147562 vs A187220.
Also, B-toothpick sequence starting from two opposite "bells" such that the distance between their midpoints is equal to 4 (See A187220). 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 bells in the structure after n stages.
We can see 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.
Also, there is a fourth structure formed by isosceles right triangles, starting from two opposite triangles, since gulls or bells can be replaced by this type of triangles.
Note that the size of the toothpicks, gulls, bells and isosceles right triangles can be adjusted such that two or more of these structures can be overlaid.
(End)
The graph of this sequence is very close to the graphs of both A147562 and A169707 (see Plot 2). - Omar E. Pol, Feb 16 2015
It appears that a(n) is also the total number of ON cells after n-th stage in the half structure of the cellular automaton described in A169707 plus the total number of ON cells after n+1 stages in the half structure of the mentioned cellular automaton, without its central cell. See the illustration of the NW-NE-SE-SW version in 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. a(n) is the number of ON cells in the structure after n-th stage, so a(1) = 2. 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. - Omar E. Pol, Mar 29 2018

Examples

			From _Omar E. Pol_, Aug 12 2013: (Start)
Illustration of initial terms:
.                                           _ _     _ _
.                     _ _ _ _   |_ _ _ _|    |_ _ _ _|
.       _ _   |_ _|    |_ _|    | |_ _| |   _|_|_ _|_|_
.   |    |    | | |    | | |      | | |        | | |
.   |   _|_   |_|_|    |_|_|      |_|_|     _ _|_|_|_ _
.             |   |   _|_ _|_   |_|_ _|_|    |_|_ _|_|
.                               |       |   _|_     _|_
.
.   2    6      14       22         30           46
.
(End)
		

Crossrefs

Programs

  • Mathematica
    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] (* Vincenzo Librandi, Feb 15 2015 *)

Formula

a(n) = 2*A139250(n).
a(n) = A187220(n+1) - 1. - Omar E. Pol, Mar 12 2011, Mar 22 2011
It appears that a(n) = A169707(n) + A170903(n), n >= 1. - Omar E. Pol, Feb 15 2015
It appears that a(n) = (A169707(n) - 1)/2 + (A169707(n+1) - 1)/2, n >= 1. - Omar E. Pol, Jul 24 2015

Extensions

Zero inserted, more terms and edited by Omar E. Pol, Mar 12 2011

A160172 T-toothpick sequence (see Comments lines for definition).

Original entry on oeis.org

0, 1, 4, 9, 18, 27, 36, 49, 74, 95, 104, 117, 142, 167, 192, 229, 302, 359, 368, 381, 406, 431, 456, 493, 566, 627, 652, 689, 762, 835, 908, 1017, 1234, 1399, 1408, 1421, 1446, 1471, 1496, 1533, 1606, 1667, 1692, 1729, 1802, 1875, 1948, 2057, 2274, 2443, 2468
Offset: 0

Views

Author

Omar E. Pol, Jun 01 2009

Keywords

Comments

A T-toothpick is formed from three toothpicks of equal length, in the shape of a T. There are three endpoints. We call the middle of the top toothpick the pivot point.
We start at round 0 with no T-toothpicks.
At round 1 we place a T-toothpick anywhere in the plane.
At round 2 we place three other T-toothpicks.
And so on...
The rule for adding a new T-toothpick is the following. A new T-toothpick is added at any exposed endpoint, with the pivot point touching the endpoint and so that the crossbar of the new toothpick is perpendicular to the exposed end.
The sequence gives the number of T-toothpicks after n rounds. A160173 (the first differences) gives the number added at the n-th round.
See the entry A139250 for more information about the toothpick process and the toothpick propagation.
On the infinite square grid a T-toothpick can be represented as a square polyedge with three components from a central point: two consecutive components on the same straight-line and a centered orthogonal component.
If the T-toothpick has three components then at the n-th round the structure is a polyedge with 3*a(n) components.
From Omar E. Pol, Mar 26 2011: (Start)
For formula and more information see the Applegate-Pol-Sloane paper, chapter 11, "T-shaped toothpicks". See also A160173.
Also, this sequence can be illustrated using another structure in which every T-toothpick is replaced by an isosceles right triangle. (End)
The structure is very distinct but the graph is similar to the graphs from the following sequences: A147562, A160164, A162795, A169707, A187220, A255366, A256260, at least for the known terms from Data section. - Omar E. Pol, Nov 24 2015
Shares with A255366 some terms with the same index, for example the element a(43) = 1729, the Hardy-Ramanujan number. - Omar E. Pol, Nov 25 2015

Crossrefs

Programs

Formula

a(n) = 2*A151920(n) + 2*A151920(n-1) + n + 1. - Charlie Neder, Feb 07 2019

Extensions

Edited and extended by N. J. A. Sloane, Jan 01 2010

A255747 Partial sums of A160552.

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 14, 21, 22, 25, 30, 37, 42, 53, 70, 85, 86, 89, 94, 101, 106, 117, 134, 149, 154, 165, 182, 201, 222, 261, 310, 341, 342, 345, 350, 357, 362, 373, 390, 405, 410, 421, 438, 457, 478, 517, 566, 597, 602, 613, 630, 649, 670, 709, 758, 793, 814, 853, 906, 965, 1046, 1173, 1302, 1365, 1366, 1369, 1374
Offset: 0

Views

Author

Omar E. Pol, Mar 05 2015

Keywords

Comments

It appears that the sums of two successive terms give the positive terms of the toothpick sequence A139250.
It appears that the odd terms (a bisection) give A162795.
It appears that a(n) is also the total number of ON cells at stage n+1 in one of the four wedges of two-dimensional cellular automaton "Rule 750" using the von Neumann neighborhood (see A169707). Therefore a(n) is also the total number of ON cells at stage n+1 in one of the four quadrants of the NW-NE-SE-SW version of that cellular automaton.
See also the formula section.
First differs from A169779 at a(11).

Examples

			Also, written as an irregular triangle in which the row lengths are the terms of A011782 (the number of compositions of n, n >= 0), the sequence begins:
0;
1;
2,   5;
6,   9, 14, 21;
22, 25, 30, 37, 42, 53, 70, 85;
86, 89, 94,101,106,117,134,149,154,165,182,201,222,261,310,341;
...
It appears that the first column gives 0 together with the terms of A047849, hence the right border gives A002450.
It appears that this triangle only shares with A151920 the positive elements of the columns 1, 2, 4, 8, 16, ... (the powers of 2).
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Nest[Join[#, 2 # + Append[Rest@#, 1]] &, {0}, 6]] (* Ivan Neretin, Feb 09 2017 *)

Formula

It appears that a(n) + a(n-1) = A139250(n), n >= 1.
It appears that a(2n-1) = A162795(n), n >= 1.
It appears that a(n) = (A169707(n+1) - 1)/4.
Showing 1-10 of 25 results. Next