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

A139251 First differences of toothpicks numbers A139250.

Original entry on oeis.org

0, 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, 60, 92, 112, 140, 208, 256, 192, 64, 4, 8, 12, 12, 16, 28, 32, 20, 16, 28
Offset: 0

Views

Author

Omar E. Pol, Apr 24 2008

Keywords

Comments

Number of toothpicks added to the toothpick structure at the n-th step (see A139250).
It appears that if n is equal to 1 plus a power of 2 with positive exponent then a(n) = 4. (For proof see the second Applegate link.)
It appears that there is a relation between this sequence, even superperfect numbers, Mersenne primes and even perfect numbers. Conjecture: The sum of the toothpicks added to the toothpick structure between the stage A061652(k) and the stage A000668(k) is equal to the k-th even perfect number, for k >= 1. For example: A000396(1) = 2+4 = 6. A000396(2) = 4+4+8+12 = 28. A000396(3) = 16+4+8+12+12+16+28+32+20+16+28+36+40+60+88+80 = 496. - Omar E. Pol, May 04 2009
Concerning this conjecture, see David Applegate's comments on the conjectures in A153006. - N. J. A. Sloane, May 14 2009
In the triangle (See example lines), the sum of row k is equal to A006516(k), for k >= 1. - Omar E. Pol, May 15 2009
Equals (1, 2, 2, 2, ...) convolved with A160762: (1, 0, 2, -2, 2, 2, 2, -6, ...). - Gary W. Adamson, May 25 2009
Convolved with the Jacobsthal sequence A001045 = A160704: (1, 3, 9, 19, 41, ...). - Gary W. Adamson, May 24 2009
It appears that the sums of two successive terms of A160552 give the positive terms of this sequence. - Omar E. Pol, Feb 19 2015
From Omar E. Pol, Feb 28 2019: (Start)
The study of the toothpick automaton on triangular grid (A296510), and other C.A. of the same family, reveals that some cellular automata that have recurrent periods can be represented in general by irregular triangles (of first differences) whose row lengths are the terms of A011782 multiplied by k, where k >= 1, is the length of an internal cycle. This internal cycle is called "word" of a cellular automaton. For example: A160121 has word "a", so k = 1. This sequence has word "ab", so k = 2. A296511 has word "abc", so k = 3. A299477 has word "abcb" so k = 4. A299479 has word "abcbc", so k = 5.
The structure of this triangle (with word "ab" and k = 2) for the nonzero terms is as follows:
a,b;
a,b;
a,b,a,b;
a,b,a,b,a,b,a,b;
a,b,a,b,a,b,a,b,a,b,a,b,a,b,a,b;
...
The row lengths are the terms of A011782 multiplied by 2, equaling the column 2 of the square array A296612: 2, 2, 4, 8, 16, ...
This arrangement has the property that the odd-indexed columns (a) contain numbers of the toothpicks that are parallel to initial toothpick, and the even-indexed columns (b) contain numbers of the toothpicks that are orthogonal to the initial toothpick (see the third triangle in the Example section).
An associated sound to the animation could be (tick, tock), (tick, tock), ..., the same as the ticking clock sound.
For further information about the "word" of a cellular automaton see A296612. (End)

Examples

			From _Omar E. Pol_, Dec 16 2008: (Start)
Triangle begins:
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,20,32;
(End)
From _David Applegate_, Apr 29 2009: (Start)
The layout of the triangle was adjusted to reveal that the columns become constant as shown below:
. 0;
. 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,...
...
The row sums give A006516.
(End)
From _Omar E. Pol_, Feb 28 2018: (Start)
Also the nonzero terms can write as an irregular triangle in which the row lengths are the terms of A011782 multiplied by 2 as shown below:
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,20,32;
...
(End)
		

Crossrefs

Equals 2*A152968 and 4*A152978 (if we ignore the first couple of terms).
See A147646 for the limiting behavior of the rows. See also A006516.
Row lengths in A011782.
Cf. A160121 (word "a"), A296511 (word "abc"), A299477 (word "abcb"), A299479 (word "abcbc").

Programs

  • Maple
    G := (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
    # 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;
    # N. J. A. Sloane, Dec 25 2009
  • Mathematica
    CoefficientList[Series[((x - x^2)/((1 - x) (1 + 2 x))) (1 + 2 x Product[1 + x^(2^k - 1) + 2 x^(2^k), {k, 0, 20}]), {x, 0, 60}], x] (* Vincenzo Librandi, Aug 22 2014 *)

Formula

Recurrence from N. J. A. Sloane, Jul 20 2009: a(0) = 0; a(2^i)=2^i for all i; otherwise write n=2^i+j, 0 < j < 2^i, then a(n) = 2a(j)+a(j+1). Proof: This is a simplification of the following recurrence of David Applegate. QED
Recurrence from David Applegate, Apr 29 2009: (Start)
Write n=2^(i+1)+j, where 0 <= j < 2^(i+1). Then, for n > 3:
for j=0, a(n) = 2*a(n-2^i) (= n = 2^(i+1))
for 1 <= j <= 2^i - 1, a(n) = a(n-2^i)
for j=2^i, a(n) = a(n-2^i)+4 (= 2^(i+1)+4)
for 2^i+1 <= j <= 2^(i+1)-2, a(n) = 2*a(n-2^i) + a(n-2^i+1)
for j=2^(i+1)-1, a(n) = 2*a(n-2^i) + a(n-2^i+1)-4
and a(n) = 2^(n-1) for n=1,2,3. (End)
G.f.: (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
With offset 0 (which would be more natural, but offset 1 is now entrenched): a(0) = 1, a(1) = 2; for i >= 1, a(2^i) = 4; otherwise write n = 2^i +j, 0 < j < 2^i, then a(n) = 2 * Sum_{ k >= 0 } 2^(wt(j+k)-k)*binomial(wt(j+k),k). - N. J. A. Sloane, Jun 03 2009
It appears that a(n) = A187221(n+1)/2. - Omar E. Pol, Mar 08 2011
It appears that a(n) = A160552(n-1) + A160552(n), n >= 1. - Omar E. Pol, Feb 18 2015

Extensions

Partially edited by Omar E. Pol, Feb 28 2019

A153006 Toothpick sequence starting at the outside corner of an infinite square from which protrudes a half toothpick.

Original entry on oeis.org

0, 1, 3, 6, 9, 13, 20, 28, 33, 37, 44, 53, 63, 78, 100, 120, 129, 133, 140, 149, 159, 174, 196, 217, 231, 246, 269, 297, 332, 384, 448, 496, 513, 517, 524, 533, 543, 558, 580, 601, 615, 630, 653, 681, 716, 768, 832, 881, 903, 918, 941
Offset: 0

Views

Author

Omar E. Pol, Dec 17 2008, Dec 19 2008, Apr 28 2009

Keywords

Comments

a(n) is the total number of integer toothpicks after n steps.
It appears that this sequence is related to triangular numbers, Mersenne primes and even perfect numbers. Conjecture: a(A000668(n))=A000217(A000668(n)). Conjecture: a(A000668(n))=A000396(n), assuming there are no odd perfect numbers.
The main entry for this sequence is A139250. See also A152980 (the first differences) and A147646.
The Mersenne prime conjectures are true, but aren't really about Mersenne primes. a(2^i-1) = 2^i (2^i-1)/2 for all i (whether or not i or 2^i-1 is prime). This follows from the formulas for A139250(2^i-1) and A139250(2^i). - David Applegate, May 11 2009
Then we can write a(A000225(k)) = A006516(k), for k > 0. - Omar E. Pol, May 23 2009
Equals A151550 convolved with [1, 2, 2, 2, ...]. (This is equivalent to the observation that the g.f. is x((1+x)/(1-x)) * Product_{n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)).) Equivalently, equals A151555 convolved with A151575. - Gary W. Adamson, May 25 2009
It appears that a(n) is also 1/4 of the total path length of a toothpick structure as A139250 after n-th stage which is constructed following a special rule: toothpicks of the new generation have length 4 when are placed on the square grid (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 a 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 length 4, 3 and 2. a(n) is also 1/4 of the number of grid points that are covered after n-th stage, except the central point of the structure. A159795 gives the total path length and also the total number of components in the structure after n-th stage. - Omar E. Pol, Oct 24 2011

Crossrefs

Programs

  • Maple
    G:=x*((1 + x)/(1 - x)) * mul( (1 + x^(2^n-1) + 2*x^(2^n)), n=1..20); # N. J. A. Sloane, May 20 2009

Formula

G.f.: x*((1 + x)/(1 - x)) * Product_{n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)). - N. J. A. Sloane, May 20 2009

Extensions

Edited by N. J. A. Sloane, Dec 19 2008

A152980 First differences of toothpick corner sequence A153006.

Original entry on oeis.org

1, 2, 3, 3, 4, 7, 8, 5, 4, 7, 9, 10, 15, 22, 20, 9, 4, 7, 9, 10, 15, 22, 21, 14, 15, 23, 28, 35, 52, 64, 48, 17, 4, 7, 9, 10, 15, 22, 21, 14, 15, 23, 28, 35, 52, 64, 49, 22, 15, 23, 28, 35, 52, 65, 56, 43, 53, 74, 91, 122, 168, 176, 112, 33, 4, 7, 9, 10, 15, 22, 21, 14, 15, 23, 28, 35, 52
Offset: 0

Views

Author

Omar E. Pol, Dec 16 2008, Dec 19 2008, Jan 02 2009

Keywords

Comments

Rows of A152978 when written as a triangle converge to this sequence. - Omar E. Pol, Jul 19 2009

Examples

			Triangle begins:
.1;
.2;
.3,3;
.4,7,8,5;
.4,7,9,10,15,22,20,9;
.4,7,9,10,15,22,21,14,15,23,28,35,52,64,48,17;
....
Rows converge to A153001. - _N. J. A. Sloane_, Jun 07 2009
		

Crossrefs

Equals A151688 divided by 2. - N. J. A. Sloane, Jun 03 2009
For generating functions of the form Product_{k>=c} (1+a*x^(2^k-1)+b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Equals A147646/4. - N. J. A. Sloane, May 01 2009

Programs

  • Maple
    Maple code from N. J. A. Sloane, May 18 2009. First define old version with offset 1:
    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(n/2+1); 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)-1); fi;
    -1;
    end;
    # Now change the offset:
    T:=n->S(n+1);
    G := (1 + x) * mul(1 + x^(2^k-1) + 2*x^(2^k),k=1..20);
  • Mathematica
    nmax = 78;
    G = x*((1 + x)/(1 - x)) * Product[ (1 + x^(2^n - 1) + 2*x^(2^n)), {n, 1, Log2[nmax] // Ceiling}];
    CoefficientList[G + O[x]^nmax, x] // Differences (* Jean-François Alcover, Jul 21 2022 *)

Formula

G.f.: (1 + x) * Prod_{ n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)). - N. J. A. Sloane, May 20 2009, corrected May 21 2009
For formula see A147646 (or, better, see the Maple code below).

Extensions

More terms (based on A147646) from N. J. A. Sloane, May 01 2009
Offset changed by N. J. A. Sloane, May 18 2009

A151548 When A160552 is regarded as a triangle with rows of lengths 1, 1, 2, 4, 8, 16, ..., this is what the rows converge to.

Original entry on oeis.org

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, 5, 11, 17, 19, 21, 39, 49, 35, 21, 39, 53, 59, 81, 127, 129, 67, 21, 39, 53, 59, 81, 127, 133, 91, 81, 131, 165, 199, 289, 383, 321, 127, 5, 11, 17, 19, 21, 39
Offset: 0

Views

Author

David Applegate, May 18 2009

Keywords

Comments

When convolved with A151575: (1, 0, 2, -2, 6, -10, 22, -42, 86, -170, 342, ...) equals the toothpick sequence A139250: (1, 3, 7, 11, 15, 23, 35, 43, ...). - Gary W. Adamson, May 25 2009
Equals A160552: [1, 1, 3, 1, 3, 5, ...] convolved with [1, 2, 0, 0, 0, ...], equivalent to a(n) = 2*A160552(n) + A160552(n+1). - Gary W. Adamson, Jun 04 2009
Equals (1, 0, -2, 2, -2, 2, ...) convolved with the Toothpick sequence, A139250. - Gary W. Adamson, Mar 06 2012
It appears that the sums of two successive terms give A147646. - Omar E. Pol, Feb 18 2015

Examples

			From _Omar E. Pol_, Jul 24 2009: (Start)
When written as a triangle:
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;
5,11,17,19,21,39,49,35,21,39,53,59,81,127,129,67,21,39,53,59,81,127,133,91,...
(End)
		

Crossrefs

Programs

  • Maple
    G := 1/(1+x) + 4*x*mul(1+x^(2^k-1)+2*x^(2^k),k=1..20); # N. J. A. Sloane, May 23 2009
    S2:=proc(n) option remember; local i,j;
    if n <= 1 then RETURN(2*n+1); fi;
    i:=floor(log(n)/log(2));
    j:=n-2^i;
    if j=0 then 5 elif j=2^i-1 then 2*n+1
    else 2*S2(j)+S2(j+1); fi;
    end; # - N. J. A. Sloane, May 22 2009
  • Mathematica
    terms = 70; CoefficientList[1/(1 + x) + 4*x*Product[1 + x^(2^k - 1) + 2*x^(2^k), {k, 1, Log[2, terms] // Ceiling}] + O[x]^terms, x] (* Jean-François Alcover, Nov 14 2017, after N. J. A. Sloane *)

Formula

a(2^k-1) = 2^(k+1)-1 for k >= 0; otherwise a(2^k) = 5 for k >= 1; otherwise a(2^i+j) = 2a(j)+a(j+1) for i >= 2, 1 <= j <= 2^i-2. - N. J. A. Sloane, May 22 2009
G.f.: 1/(1+x) + 4*x*mul(1+x^(2^k-1)+2*x^(2^k),k=1..oo). - N. J. A. Sloane, May 23 2009
a(n) = A147646(n) - a(n-1), n >= 1. - Omar E. Pol, Feb 19 2015

A151688 G.f.: Product_{n>=0} (1 + x^(2^n-1) + 2*x^(2^n)).

Original entry on oeis.org

2, 4, 6, 6, 8, 14, 16, 10, 8, 14, 18, 20, 30, 44, 40, 18, 8, 14, 18, 20, 30, 44, 42, 28, 30, 46, 56, 70, 104, 128, 96, 34, 8, 14, 18, 20, 30, 44, 42, 28, 30, 46, 56, 70, 104, 128, 98, 44, 30, 46, 56, 70, 104, 130, 112, 86, 106, 148, 182, 244, 336, 352, 224, 66, 8, 14, 18, 20, 30, 44
Offset: 0

Views

Author

Omar E. Pol, May 02 2009

Keywords

Comments

This is essentially the same g.f. as A151550 but with the n=0 term included.

Examples

			If written as a triangle, begins:
  2;
  4;
  6, 6;
  8, 14, 16, 10;
  8, 14, 18, 20, 30, 44, 40, 18;
  8, 14, 18, 20, 30, 44, 42, 28, 30, 46, 56, 70, 104, 128, 96, 34;
  ...
		

Crossrefs

Equals 2*A152980 = A147646/2.
Equals limit of rows of triangle in A152968.
For generating functions of the form Product_{k>=c} (1 + a*x^(2^k-1) + b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.

Programs

  • Mathematica
    terms = 70; CoefficientList[Product[(1+x^(2^n-1) + 2 x^(2^n)), {n, 0, Log[2, terms] // Ceiling}] + O[x]^terms, x] (* Stefano Spezia, Sep 02 2025 *)

Formula

a(n) = Sum_{k>=0} 2^(wt(n+k)-k)*binomial(wt(n+k),k).

Extensions

Edited by N. J. A. Sloane, Jun 03 2009, Jul 14 2009

A159795 a(n) = 4*A153006(n).

Original entry on oeis.org

0, 4, 12, 24, 36, 52, 80, 112, 132, 148, 176, 212, 252, 312, 400, 480, 516, 532, 560, 596, 636, 696, 784, 868, 924, 984, 1076, 1188, 1328, 1536, 1792, 1984, 2052, 2068, 2096, 2132, 2172, 2232, 2320, 2404, 2460, 2520, 2612, 2724, 2864, 3072, 3328, 3524, 3612
Offset: 0

Views

Author

Omar E. Pol, May 02 2009

Keywords

Comments

For the first differences see A147646. - Omar E. Pol, Jul 24 2009
It appears that a(n) is also the total path length of a toothpick structure as A139250 after n-th stage which is constructed following a special rule: toothpicks of the new generation have length 4 when are placed on the 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 a 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 length 4, 3 and 2. a(n) is also the total number of components in the structure after n-th stage. a(n) is also the number of grid points that are covered after n-th stage, except the central point of the structure. The toothpick sequence A139250 gives the number of toothpicks after n-th stage. - Omar E. Pol, Oct 24 2011

Crossrefs

Extensions

More terms from Omar E. Pol, Jul 24 2009

A152768 Records in A139251.

Original entry on oeis.org

1, 2, 4, 8, 12, 16, 28, 32, 36, 40, 60, 88, 92, 112, 140, 208, 256, 260, 296, 364, 488, 672, 704, 708, 744, 956, 1216, 1648, 2048, 2052, 2096, 2108, 2396, 3128, 4080, 5344, 5952, 5956, 6000, 6300, 7920, 10336, 13504, 16640, 16644, 16688, 16696, 16988, 17100, 18612, 20040
Offset: 1

Views

Author

Omar E. Pol, Dec 15 2008, Dec 20 2008

Keywords

Comments

Excluding the initial 1 and 2, this sequence also gives the records in A147646. - Nathaniel Johnston, Apr 10 2011

Crossrefs

Cf. A139251, A139252, A139560. Toothpick sequence: A139250.
Cf. A052184.

Extensions

a(18) - a(51) from Nathaniel Johnston, Apr 10 2011

A168114 If A168113 is regarded as a triangle then the rows converge to this sequence.

Original entry on oeis.org

3, 6, 7, 8, 9, 16, 17, 12, 9, 16, 19, 22, 31, 46, 41, 20, 9, 16, 19, 22, 31, 46, 43, 30, 31, 48, 57, 72, 105, 130, 97, 36, 9, 16, 19, 22, 31, 46, 43, 30, 31, 48, 57, 72, 105, 130, 99, 46, 31, 48, 57, 72, 105, 132, 113, 88, 107, 150, 183, 246, 337, 354, 225
Offset: 1

Views

Author

Omar E. Pol, Dec 07 2009

Keywords

Crossrefs

Extensions

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

A161326 Sequence to which the rows of the triangle of A160121 converge.

Original entry on oeis.org

9, 21, 15, 21, 27, 51, 33, 21, 27, 51, 51, 57, 69, 117, 87, 33, 27, 51, 51, 57, 75, 129, 117, 75, 69, 117, 135
Offset: 1

Views

Author

Omar E. Pol, Jun 18 2009

Keywords

Crossrefs

A159785 a(n) = A152980(n)*3.

Original entry on oeis.org

3, 6, 9, 9, 12, 21, 24, 15, 12, 21, 27, 30, 45, 66, 60, 27, 12, 21, 27, 30, 45, 66, 63, 42, 45, 69, 84, 105, 156, 192, 144, 51, 12, 21, 27, 30, 45, 66, 63, 42, 45, 69, 84, 105, 156, 192, 147, 66, 45, 69, 84, 105, 156, 195, 168, 129, 159, 222, 273, 366, 504, 528
Offset: 1

Views

Author

Omar E. Pol, May 02 2009

Keywords

Crossrefs

Toothpick sequence: A139250.

Extensions

More terms from 3*A152980(n) by Jinyuan Wang, Mar 14 2020
Showing 1-10 of 12 results. Next