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

A246336 Partial sums of A151548.

Original entry on oeis.org

1, 4, 9, 16, 21, 32, 49, 64, 69, 80, 97, 116, 137, 176, 225, 256, 261, 272, 289, 308, 329, 368, 417, 452, 473, 512, 565, 624, 705, 832, 961, 1024, 1029, 1040, 1057, 1076, 1097, 1136, 1185, 1220, 1241, 1280, 1333, 1392, 1473, 1600, 1729, 1796, 1817, 1856, 1909, 1968, 2049, 2176
Offset: 0

Views

Author

N. J. A. Sloane, Aug 30 2014

Keywords

Comments

Arises in the analysis of a certain 2-D cellular automaton (see A169707).
a(46) = 1729 is also the Hardy-Ramanujan number. - Omar E. Pol, Feb 17 2015
It appears that sums of two successive terms give the numbers greater than 1 in A194811. - Omar E. Pol, Mar 05 2015

Crossrefs

Formula

G.f.: 1/(1-x^2) + (4*x/(1-x))*mul(1+x^(2^k-1)+2*x^(2^k),k=1..oo).
From Omar E. Pol, Feb 18 2015: (Start)
It appears that:
a(2^k-2) = (2^k-1)^2, if k >= 1.
a(2^k-1) = 4^k, if k >= 1.
a(2^k) = 4^k + 5, if k >= 1.
(End)

A151549 a(n) = (A151548(n)-1)/2.

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 8, 7, 2, 5, 8, 9, 10, 19, 24, 15, 2, 5, 8, 9, 10, 19, 24, 17, 10, 19, 26, 29, 40, 63, 64, 31, 2, 5, 8, 9, 10, 19, 24, 17, 10, 19, 26, 29, 40, 63, 64, 33, 10, 19, 26, 29, 40, 63, 66, 45, 40, 65, 82, 99, 144, 191, 160, 63, 2, 5, 8, 9, 10, 19, 24, 17, 10, 19, 26, 29, 40, 63
Offset: 0

Views

Author

N. J. A. Sloane, May 18 2009

Keywords

Examples

			From _Omar E. Pol_, Nov 30 2013: (Start)
Written as an irregular triangle in which row lengths is A011782 the right border gives A000225.
Triangle begins:
0;
1;
2,3;
2,5,8,7;
2,5,8,9,10,19,24,15;
2,5,8,9,10,19,24,17,10,19,26,29,40,63,64,31;
2,5,8,9,10,19,24,17,10,19,26,29,40,63,64,33,10,19,26,29,40,63,66,45,40,65,82,99,144,191,160,63;
(End)
		

Crossrefs

Cf. A160552.

A255046 a(n) = (1 + A151548(n))/2.

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 9, 8, 3, 6, 9, 10, 11, 20, 25, 16, 3, 6, 9, 10, 11, 20, 25, 18, 11, 20, 27, 30, 41, 64, 65, 32, 3, 6, 9, 10, 11, 20, 25, 18, 11, 20, 27, 30, 41, 64, 65, 34, 11, 20, 27, 30, 41, 64, 67, 46, 41, 66, 83, 100, 145, 192, 161, 64, 3, 6, 9, 10, 11, 20
Offset: 0

Views

Author

Omar E. Pol, Feb 15 2015

Keywords

Comments

It appears that when A255045 is regarded as a triangle with rows of lengths 1, 2, 4, 8, 16, ..., this is what the rows converge to.

Examples

			Written as an irregular triangle in which the row lengths are the terms of A011782:
1;
2;
3,4;
3,6,9,8;
3,6,9,10,11,20,25,16;
3,6,9,10,11,20,25,18,11,20,27,30,41,64,65,32;
3,6,9,10,11,20,25,18,11,20,27,30,41,64,65,34,11,20,27,30,41,64,67,46,41,66,83,100,145,192,161,64;
...
Right border gives A000079.
		

Crossrefs

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

A078008 Expansion of (1 - x)/((1 + x)*(1 - 2*x)).

Original entry on oeis.org

1, 0, 2, 2, 6, 10, 22, 42, 86, 170, 342, 682, 1366, 2730, 5462, 10922, 21846, 43690, 87382, 174762, 349526, 699050, 1398102, 2796202, 5592406, 11184810, 22369622, 44739242, 89478486, 178956970, 357913942, 715827882, 1431655766, 2863311530, 5726623062
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Conjecture: a(n) = the number of fractions in the infinite Farey row of 2^n terms with even denominators. Compare the Salamin & Gosper item in the Beeler et al. link. - Gary W. Adamson, Oct 27 2003
Counts closed walks starting and ending at the same vertex of a triangle. 3*a(n) = P(C_n, 3) chromatic polynomial for 3 colors on cyclic graph C_n. A078008(n) + 2*A001045(n) = 2^n provides decomposition of Pascal's triangle. - Paul Barry, Nov 17 2003
Permutations with one fixed point avoiding 123 and 132.
General form: iterate k -> 2^n - k. See also A001045. - Vladimir Joseph Stephan Orlovsky, Dec 11 2008
The inverse g.f. generates sequence 1, 0, -2, -2, -2, -2, ...
a(n) gives the number of oriented (i.e., unreduced for symmetry) meanders on an (n+2) X 3 rectangular grid; see A201145. - Jon Wild, Nov 22 2011
Pisano period lengths: 1, 1, 6, 1, 4, 6, 6, 2, 18, 4, 10, 6, 12, 6, 12, 2, 8, 18, 18, 4, ... - R. J. Mathar, Aug 10 2012
a(n) is the number of length n binary words that end in an odd length run of 0's if we do not include the first letter of the word in our run length count. a(4) =6 because we have 0000, 0010, 0110, 1000, 1010, 1110. - Geoffrey Critzer, Dec 16 2013
a(n) is the top left entry of the n-th power of any of the six 3 X 3 matrices [0, 1, 1; 1, 1, 1; 1, 0, 0], [0, 1, 1; 1, 1, 0; 1, 1, 0], [0, 1, 1; 1, 0, 1; 1, 1, 0], [0, 1, 1; 1, 1, 0; 1, 0, 1], [0, 1, 1; 1, 0, 1; 1, 0, 1] or [0, 1, 1; 1, 0, 0; 1, 1, 1]. - R. J. Mathar, Feb 04 2014
a(n) is the number of compositions of n into parts of two kinds without part 1. - Gregory L. Simay, Jun 04 2018
a(n) is the number of words of length n over a binary alphabet whose position in the lexicographic order is a multiple of three. a(3) = 2: aba, bab. - Alois P. Heinz, Apr 13 2022
a(n) is the number of words of length n over a ternary alphabet starting with a fixed letter (say, 'a') and ending in a different letter, such that no two adjacent letters are the same. a(4) = 6: abab, abac, abcb, acab, acac, acbc. - Ignat Soroko, Jul 19 2023

Examples

			G.f. = 1 + 2*x^2 + 2*x^3 + 6*x^4 + 10*x^5 + 22*x^6 + ... - _Michael Somos_, Mar 18 2022
		

References

  • Kenneth Edwards and Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983, ex. 1.1.10a.

Crossrefs

First differences of A001045.
See A151575 for a signed version.
Bisections: A047849, A020988.

Programs

Formula

Euler expands(1-x)/(1 - x - 2*x^2) into an infinite series and finds that the coefficient of the n-th term is (2^n + (-1)^n 2)/3. Section 226 shows that Euler could have easily found the recursion relation: a(n) = a(n-1) + 2a(n-2) with a(0) = 1 and a(1) = 0. - V. Frederick Rickey (fred-rickey(AT)usma.edu), Feb 10 2006. [Typos corrected by Jaume Oliver Lafont, Jun 01 2009]
a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n)+3*k) where f(n) = (0, 2, 1, 0, 2, 1, ...) = A080424(n). - Paul Barry, Feb 20 2003
E.g.f. (exp(2*x) + 2*exp(-x))/3. - Paul Barry, Apr 20 2003
a(n) = A001045(n) + (-1)^n = A000079(n) - 2*A001045(n). - Paul Barry, Feb 20 2003
a(n) = (2^n + 2*(-1)^n)/3. - Mario Catalani (mario.catalani(AT)unito.it), Aug 29 2003
a(n) = T(n, i/(2*sqrt(2)))*(-i*sqrt(2))^n - U(n-1, i/(2*sqrt(2)))*(-i*sqrt(2))^(n-1)/2. - Paul Barry, Nov 17 2003
From Paul Barry, Jul 30 2004: (Start)
a(n) = 2*a(n-1) + 2*(-1)^n for n > 0, with a(0)=1.
a(n) = Sum_{k=0..n} (-1)^k*(2^(n-k-1) + 0^(n-k)/2). (End)
a(n) = A014113(n-1) for n > 0; a(n) = A052953(n-1) - 2*(n mod 2) = sum of n-th row of the triangle in A108561. - Reinhard Zumkeller, Jun 10 2005
A137208(n+1) - 2*A137208(n) = a(n) signed. - Paul Curtz, Aug 03 2008
a(n) = A001045(n+1) - A001045(n) - Paul Curtz, Feb 09 2009
If p[1] =0, and p[i]=2, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - Milan Janjic, Apr 29 2010
a(n) = 2*(a(n-2) + a(n-3) + a(n-4) ... + a(0)), that is, twice the sum of all the previous terms except the last; with a(0) = 1 and a(1) = 0. - Benoit Jubin, Nov 21 2011
a(n+1) = 2*A001045(n). - Benoit Jubin, Nov 22 2011
G.f.: 1 - x + x*Q(0), where Q(k) = 1 + 2*x^2 + (2*k+3)*x - x*(2*k+1 + 2*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 05 2013
G.f.: 1+ x^2*Q(0), where Q(k) = 1 + 1/(1 - x*(4*k+1+2*x)/(x*(4*k+3+2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 01 2014
a(n) = 3*a(n-2) + 2*a(n-3). - David Neil McGrath, Sep 10 2014
a(n) = (-1)^n * A151575(n). - G. C. Greubel, Jun 28 2019
a(n)+a(n+1) = 2^n. - R. J. Mathar, Feb 24 2021
a(n) = -a(2-n) * (-2)^(n-1) = (3/2)*(a(n-1) + a(n-2)) - a(n-3) for all n in Z. - Michael Somos, Mar 18 2022

A160552 a(0)=0, a(1)=1; a(2^i+j) = 2*a(j) + a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 5, 11, 17, 15, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31, 5, 11, 17, 19, 21, 39, 49, 35, 21, 39, 53, 59, 81, 127, 129, 63, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31
Offset: 0

Views

Author

David Applegate, May 18 2009

Keywords

Comments

This recurrence is patterned after the one for A152980, but without the special cases.
Sequence viewed as triangle:
0,
1,
1, 3,
1, 3, 5, 7,
1, 3, 5, 7, 5, 11, 17, 15,
1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31.
The rows converge to A151548.
Also the sum of the terms in the k-th row (k >= 1) is 4^(k-1). Proof by induction. - N. J. A. Sloane, Jan 21 2010
If this sequence [1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 5, 11, 17, 15, ...] is convolved with [1, 2, 2, 2, 2, 2, 2, ...] we obtain A139250, the toothpick sequence. Example: A139250(5) = 15 = (1, 2, 2, 2, 2) * (3, 1, 3, 1, 1). - Gary W. Adamson, May 19 2009
Starting with 1 and convolved with [1, 2, 0, 0, 0, ...] = A151548. - Gary W. Adamson, Jun 04 2009
Refer to A162956 for the analogous triangle using N=3. - Gary W. Adamson, Jul 20 2009
It appears that the sums of two successive terms give the positive terms of A139251. - Omar E. Pol, Feb 18 2015

Examples

			a(2) = a(2^1+0) = 2*a(0) + a(1) = 1, a(3) = a(2^1+1) = 2*a(1) + a(2) = 3*a(2^i) = 2*a(0) + a(1) = 1.
		

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Maple
    S:=proc(n) option remember; local i,j; if n <= 1 then RETURN(n); fi; i:=floor(log(n)/log(2)); j:=n-2^i; 2*S(j)+S(j+1); end; # N. J. A. Sloane, May 18 2009
    H := x*(1+2*x)/(1+x) + (4*x^2/(1+2*x))*(mul(1+x^(2^k-1)+2*x^(2^k),k=1..20)-1); series(H,x,120); # N. J. A. Sloane, May 23 2009
  • Mathematica
    Nest[Join[#, 2 # + Append[Rest@#, 1]] &, {0}, 7] (* Ivan Neretin, Feb 09 2017 *)

Formula

G.f.: x*(1+2*x)/(1+x) + (4*x^2/(1+2*x))*(-1 + Product_{k>=1} (1 + x^(2^k-1) + 2*x^(2^k))). - N. J. A. Sloane, May 23 2009, based on Gary W. Adamson's comment above and the known g.f. for A139250.
It appears that a(n) = A169708(n)/4, n >= 1. - Omar E. Pol, Feb 15 2015
It appears that a(n) = A139251(n) - a(n-1), n >= 1. - Omar E. Pol, Feb 18 2015

A151575 G.f.: (1+x)/(1+x-2*x^2).

Original entry on oeis.org

1, 0, 2, -2, 6, -10, 22, -42, 86, -170, 342, -682, 1366, -2730, 5462, -10922, 21846, -43690, 87382, -174762, 349526, -699050, 1398102, -2796202, 5592406, -11184810, 22369622, -44739242, 89478486, -178956970, 357913942, -715827882, 1431655766, -2863311530, 5726623062
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009, based on a suggestion from Gary W. Adamson

Keywords

Comments

Or, g.f. = (1+x)/((1-x)*(1-2*x)).
A signed version of A078008, which is the main entry.
[1, 0, 2, -2, 6, -10, 22, -42, 86, ...] = an operator for toothpick sequences. The sequence convolved with A151548 = toothpick sequence A139250. The sequence convolved with A151555 = toothpick sequence A153006. - Gary W. Adamson, May 25 2009

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x)/(1+x-2x^2),{x,0,40}],x] (* or *) LinearRecurrence[{-1,2},{1,0},40] (* Harvey P. Dale, May 31 2023 *)

Formula

From R. J. Mathar, Jul 08 2009: (Start)
a(n) = (2 + (-2)^n)/3 = (-1)^n*A078008(n), n>=0.
a(n) = 2*A077925(n-2), n>1. (End)
a(n) = A084247(n+1)/2. - Philippe Deléham, Sep 21 2009
G.f.: 1 + x - x*Q(0), where Q(k) = 1 + 2*x^2 - (2*k+3)*x + x*(2*k+1 - 2*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 05 2013

A147646 If A139251 is written as a triangle with rows of lengths 1, 2, 4, 8, 16, ..., the n-th row begins with 2^n followed by the first 2^n-1 terms of the present sequence.

Original entry on oeis.org

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, 140, 208, 256, 192, 68, 16, 28, 36, 40, 60, 88, 84, 56, 60, 92, 112, 140, 208, 256, 196, 88, 60, 92, 112, 140, 208, 260, 224, 172, 212, 296, 364, 488, 672, 704, 448, 132
Offset: 1

Views

Author

David Applegate, Apr 30 2009

Keywords

Comments

Limiting behavior of the rows of the triangle in A139251 when the first column of that triangle is omitted.
First differences of A159795. - Omar E. Pol, Jul 24 2009
It appears that a(n) is also the number of new grid points that are covered at n-th stage of A139250 version "Tree", assuming the toothpicks have length 4, 3, and 2 (see also A159795 and A153006). - Omar E. Pol, Oct 25 2011

Examples

			Further comments: A139251 as a triangle is:
. 1
. 2 4
. 4 4 8 12
. 8 4 8 12 12 16 28 32
. 16 4 8 12 12 16 28 32 20 16 28 36 40 60 88 80
. 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 ...
leading to the present sequence:
. 4 8 12 12 16 28 32 20 16 28 36 40 60 88 80 36 16 28 36 40 60 88 84 56 ...
Note that this can also be written as a triangle:
. 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 140 208 256
. 192 68 16 28 36 40 60 88 84 56 60 92 112 140 208 256 196 88 60 92 112 140 ...
The first column is (n+1)2^n (where n is the row number),
the second column is 2^(n+1)+4,
and the rest exhibits the same constant column behavior,
where the rows converge to:
. 16 28 36 40 60 88 84 56 60 92 112 140 208 256 196 88 60 92 112 140 ...
Once again this can be written as a triangle:
. 16
. 28 36 40 60
. 88 84 56 60 92 112 140 208
. 256 196 88 60 92 112 140 208 260 224 172 212 296 364 488 672
. 704 452 152 60 92 112 140 208 260 224 172 212 296 364 488 672 708 480 236 ...
and this behavior continues ad infinitum.
		

Crossrefs

Equals 2*A151688 and 4*A152980. - N. J. A. Sloane, Jul 16 2009

Programs

  • Maple
    S:=proc(n) option remember; local i,j;
    if n <= 0 then RETURN(0); fi;
    if n <= 2 then RETURN(2^(n+1)); fi;
    i:=floor(log(n)/log(2));
    j:=n-2^i;
    if j=0 then RETURN(2*n+4); fi;
    if j<2^i-1 then RETURN(2*S(j)+S(j+1)); fi;
    if j=2^i-1 then RETURN(2*S(j)+S(j+1)-4); fi;
    -1;
    end; # N. J. A. Sloane, May 18 2009

Formula

Letting n = 2^i + j for 0 <= j < 2^i, we have the recurrence (see A139251 for proof):
a(1) = 4
a(2) = 8
a(n) = 2n+4 = 2*a(n/2) - 4 if j = 0
a(n) = 2*a(j) + a(j+1) - 4 if j = 2^i-1
a(n) = 2*a(j) + a(j+1) if 1 <= j < 2^i-1
It appears that a(n) = A151548(n-1) + A151548(n). - Omar E. Pol, Feb 19 2015

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.

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
Showing 1-10 of 15 results. Next