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-5 of 5 results.

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

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

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Mar 07 2011

Keywords

Comments

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

Examples

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

Crossrefs

Programs

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

Formula

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

A187211 First differences of A187210.

Original entry on oeis.org

0, 1, 4, 7, 12, 22, 20, 22, 40, 54, 40, 22, 40, 54, 56, 70, 120, 134, 72, 22, 40, 54, 56, 70, 120, 134, 88, 70, 120, 150, 168, 246, 360, 326, 136, 22, 40, 54, 56, 70, 120, 134, 88, 70, 120, 150, 168, 246, 360, 326, 152, 70, 120, 150, 168, 246, 360, 342, 232, 246, 376, 454, 568, 838, 1032
Offset: 0

Views

Author

Omar E. Pol, Mar 07 2011

Keywords

Comments

Number of Q-toothpicks added at n-th stage to the Q-toothpick structure of A187210.
For the connection with A139251, the first differences of the toothpick sequence A139250, see the Formula section. - Omar E. Pol, Apr 02 2016

Examples

			Written as an irregular triangle the sequence begins:
0;
1;
4;
7;
12;
22, 20;
22, 40, 54, 40;
22, 40, 54, 56, 70, 120, 134, 72;
22, 40, 54, 56, 70, 120, 134, 88, 70, 120, 150, 168, 246, 360, 326, 136;
...
The rows of this triangle tend to A188156.
From _Omar E. Pol_, Apr 02 2016: (Start)
For n = 5 we have that A139251(5-2) = 4, A267699(5-2) = 7 and A267695(5-1) = 7, so a(5) = 2*4 + 7 + 7 = 22.
For n = 10 we have that A139251(10-2) = 8, A267699(10-2) = 20 and A267695(10-1) = 4, so a(10) = 2*8 + 20 + 4 = 40.
(End)
Starting from a(3) = 7 the row lengths of triangle are the terms of A011782. - _Omar E. Pol_, Apr 04 2016
		

Crossrefs

Formula

a(2^n + 2) = 16 + 8(2^(n-1) - 1), n >= 3. [Nathaniel Johnston, Mar 26 2011]
From Omar E. Pol, Apr 02 2016: (Start)
a(n) = floor(sqrt(2*n^3)), if 0<=n<=2 or n=6.
a(n) = 2*A139251(n-2) + A267699(n-2) + A267695(n-1), if 3<=n<=5 or n>=7.
(End)

Extensions

Terms after a(7) from Nathaniel Johnston, Mar 26 2011

A187213 Number of Q-toothpicks added at n-th stage to the structure of A187212.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 8, 10, 8, 4, 8, 12, 12, 16, 28, 30, 16, 4, 8, 12, 12, 16, 28, 32, 20, 16, 28, 36, 40, 60, 88, 78, 32, 4, 8, 12, 12, 16, 28, 32, 20, 16, 28, 36, 40, 60, 88, 80, 36, 16, 28, 36, 40, 60, 88, 84, 56, 60, 92, 112
Offset: 0

Views

Author

Omar E. Pol, Mar 22 2011

Keywords

Comments

Essentially the first differences of A187212.

Examples

			Contribution from Omar E. Pol, Mar 29 2011 (Start):
If written as a triangle begins:
0,
1,
2,
2,4,
4,8,10,8,
4,8,12,12,16,28,30,16,
4,8,12,12,16,28,32,20,16,28,36,40,60,88,78,32,
(End)
		

Crossrefs

Formula

It appears that if n = 2^k - 1, for k >= 2, then a(n) = A139251(n) - 2 otherwise a(n) = A139251(n). - Omar E. Pol, Mar 30 2011

Extensions

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

A187217 Number of Q-toothpicks added at n-th stage to the structure of A187216.

Original entry on oeis.org

0, 2, 6, 8, 14, 22, 30, 22, 38, 54, 70, 22, 38, 54, 70, 54, 102, 150, 134, 22, 38, 54, 70, 54, 102, 150, 134, 54, 102, 150, 166, 182, 326, 406, 262, 22, 38, 54, 70, 54, 102, 150, 134, 54, 102, 150, 166, 182, 326, 406, 262, 54, 102, 150, 166, 182, 326, 406, 294, 182, 326
Offset: 0

Views

Author

Omar E. Pol, Mar 30 2011

Keywords

Comments

Essentially the first differences of A187216.

Crossrefs

Extensions

a(15) - a(60) from Nathaniel Johnston, Apr 15 2011
Showing 1-5 of 5 results.