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.

Previous Showing 11-20 of 31 results. Next

A160407 First differences of toothpick numbers A160406.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 4, 4, 2, 2, 4, 4, 4, 6, 10, 8, 2, 2, 4, 4, 4, 6, 10, 8, 4, 6, 10, 10, 12, 20, 26, 16, 2, 2, 4, 4, 4, 6, 10, 8, 4, 6, 10, 10, 12, 20, 26, 16, 4, 6, 10, 10, 12, 20, 26, 18, 12, 20, 28, 30, 42
Offset: 1

Views

Author

Omar E. Pol, May 23 2009

Keywords

Comments

Number of toothpicks added at n-th stage in the toothpick structure of A160406.
From Omar E. Pol, Mar 15 2020: (Start)
The cellular automaton described in A160406 has word "ab", so the structure of this triangle 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.
For further information about the "word" of a cellular automaton see A296612. (End)

Examples

			From _Omar E. Pol_, Jul 18 2009, Mar 15 2020: (Start)
If written as a triangle:
1,1;
2,2;
2,2,4,4;
2,2,4,4,4,6,10,8;
2,2,4,4,4,6,10,8,4,6,10,10,12,20,26,16;
2,2,4,4,4,6,10,8,4,6,10,10,12,20,26,16,4,6,10,10,12,20,26,18,12,20,28,30,42;...
(End)
		

Crossrefs

Extensions

More terms from N. J. A. Sloane, Jul 17 2009

A151920 a(n) = (Sum_{i=1..n+1} 3^wt(i))/3, where wt() = A000120().

Original entry on oeis.org

1, 2, 5, 6, 9, 12, 21, 22, 25, 28, 37, 40, 49, 58, 85, 86, 89, 92, 101, 104, 113, 122, 149, 152, 161, 170, 197, 206, 233, 260, 341, 342, 345, 348, 357, 360, 369, 378, 405, 408, 417, 426, 453, 462, 489, 516, 597, 600, 609, 618, 645, 654, 681, 708, 789, 798, 825, 852, 933, 960
Offset: 0

Views

Author

N. J. A. Sloane, Aug 05 2009, Aug 06 2009

Keywords

Comments

Partial sums of A147610 (but with offset changed to 0).
It appears that the first bisection gives the positive terms of A147562. - Omar E. Pol, Mar 07 2015

Examples

			n=3: (3^1+3^1+3^2+3^1)/3 = 18/3 = 6.
n=18: the binary expansion of 18+1 is 10011, i.e., 19 = 2^4 + 2^1 + 2^0.
The exponents of these powers of 2 (4, 1 and 0) reoccur as exponents in the powers of 4: a(19) = 3^0 * [(4^4 - 1) / 3 + 1] + 3^1 * [(4^1 - 1) / 3 + 1] + 3^2 * [(4^0 - 1)/3 + 1] = 1 * 86 + 3 * 2 + 9 * 1 = 101. - _David A. Corneth_, Mar 21 2015
		

Crossrefs

Programs

  • Mathematica
    t = Nest[Join[#, # + 1] &, {0}, 14]; Table[Sum[3^t[[i + 1]], {i, 1, n}]/3, {n, 60}] (* Michael De Vlieger, Mar 21 2015 *)
  • PARI
    a(n) = sum(i=1, n+1, 3^hammingweight(i))/3; \\ Michel Marcus, Mar 07 2015
    
  • PARI
    a(n)={b=binary(n+1);t=#b;e=-1;sum(i=1,#b,e+=(b[i]==1);(b[i]==1)*3^e*((4^(#b-i)-1)/3+1))} \\ David A. Corneth, Mar 21 2015

Formula

a(n) = (A147562(n+2) - 1)/4 = (A151917(n+2) - 1)/2. - Omar E. Pol, Mar 13 2011
a(n) = (A130665(n+1) - 1)/3. - Omar E. Pol, Mar 07 2015
a(n) = a(n-1) + 3^A000120(n+1)/3. - David A. Corneth, Mar 21 2015

A152998 Toothpick sequence on the semi-infinite square grid.

Original entry on oeis.org

0, 1, 3, 5, 7, 11, 17, 21, 23, 27, 33, 39, 47, 61, 77, 85, 87, 91, 97, 103, 111, 125, 141, 151, 159, 173, 191, 211, 241, 285, 325, 341, 343, 347, 353, 359, 367, 381, 397, 407, 415, 429, 447, 467, 497, 541, 581, 599, 607, 621, 639
Offset: 0

Views

Author

Omar E. Pol, Dec 19 2008, Dec 23 2008, Jan 02 2008

Keywords

Comments

Contribution from Omar E. Pol, Oct 01 2011 (Start):
On the semi-infinite square grid, at stage 0, we start from a vertical half toothpick at [(0,0),(0,1)]. This half toothpick represents one of the two components of the first toothpick placed in the toothpick structure of A139250. Consider only the toothpicks of length 2, so a(0) = 0.
At stage 1, we place an orthogonal toothpick of length 2 centered at the end, so a(1) = 1.
In each subsequent stage, for every exposed toothpick end, place an orthogonal toothpick centered at that end.
The sequence gives the number of toothpicks after n stages. A152968 (the first differences) gives the number of toothpicks added to the structure at n-th stage.
For more information see A139250. (End)

Crossrefs

Formula

a(n) = (A139250(n+1)-1)/2.
From Omar E. Pol, Oct 01 2011: (Start)
a(n) = A139250(n+1) - A153003(n) + A153000(n-1) - 1, if n >= 1.
a(n) = A153003(n) - A153000(n-1), if n >= 1.
a(n) = 2*A153000(n-1) + 1, if n >= 1.
(End)
a(n) = (A187220(n+2) - 3)/4. - Omar E. Pol, Feb 18 2013

A153003 Toothpick sequence in the first three quadrants.

Original entry on oeis.org

0, 1, 4, 7, 10, 16, 25, 31, 34, 40, 49, 58, 70, 91, 115, 127, 130, 136, 145, 154, 166, 187, 211, 226, 238, 259, 286, 316, 361, 427, 487, 511, 514, 520, 529, 538, 550, 571, 595, 610, 622, 643, 670, 700, 745, 811, 871, 898, 910, 931
Offset: 0

Views

Author

Omar E. Pol, Jan 02 2009

Keywords

Comments

From Omar E. Pol, Oct 01 2011: (Start)
On the infinite square grid, consider only the first three quadrants and count only the toothpicks of length 2.
At stage 0, we start from a vertical half toothpick at [(0,0),(0,1)]. This half toothpick represents one of the two components of the first toothpick placed in the toothpick structure of A139250, so a(0) = 0.
At stage 1, we place an orthogonal toothpick of length 2 centered at the end, so a(1) = 1. Also we place half toothpick at [(0,-1),(1,-1)]. This last half toothpick represents one of the two components of the third toothpick placed in the toothpick structure of A139250.
At stage 2, we place three toothpicks, so a(2) = 1+3 = 4.
In each subsequent stage, for every exposed toothpick end, place an orthogonal toothpick centered at that end.
The sequence gives the number of toothpicks after n stages. A153004 (the first differences) gives the number of toothpicks added to the structure at n-th stage.
Note that this sequence is different from the toothpick "corner" sequence A153006. For more information see A139250. (End)

Crossrefs

Programs

  • Mathematica
    A139250[n_] := A139250[n] = Module[{m, k}, If[n == 0, Return[0]]; m = 2^(Length[IntegerDigits[n, 2]] - 1); k = (2 m^2 + 1)/3; If[n == m, k, k + 2 A139250[n - m] + A139250[n - m + 1] - 1]];
    a[n_] := If[n == 0, 0, (3/4)(A139250[n + 1] - 3) + 1];
    a /@ Range[0, 49] (* Jean-François Alcover, Apr 06 2020 *)
  • 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 (a139250(n + 1) - 3)*3/4 + 1
    [a(n) for n in range(51)] # Indranil Ghosh, Jul 01 2017

Formula

a(n) = (A139250(n+1)-3)*3/4 + 1, if n >= 1.
From Omar E. Pol, Oct 01 2011: (Start)
a(n) = A139250(n+1) - A152998(n) + A153000(n-1) - 1, if n >= 1.
a(n) = A139250(n+1) - A153000(n-1) - 2, if n >= 1.
a(n) = A152998(n) + A153000(n-1), if n >= 1.
(End)

A182838 H-toothpick sequence in the first quadrant starting with a D-toothpick placed on the diagonal [(0,1), (1,2)] (see Comments for precise definition).

Original entry on oeis.org

0, 1, 3, 7, 11, 15, 21, 31, 39, 43, 49, 61, 77, 91, 105, 127, 143, 147, 153, 165, 181, 197, 217, 249, 285, 307, 321, 349, 391, 431, 467, 517, 549, 553, 559, 571, 587, 603, 623, 655, 691, 715
Offset: 0

Views

Author

Omar E. Pol, Dec 12 2010

Keywords

Comments

An H-toothpick sequence is a toothpick sequence on a square grid that resembles a partial honeycomb of hexagons.
The structure has two types of elements: the classic toothpicks with length 1 and the "D-toothpicks" with length sqrt(2).
Classic toothpicks are placed in the vertical direction and D-toothpicks are placed in a diagonal direction.
Each hexagon has area = 4.
The network looks like an elongated hexagonal lattice placed on the square grid so that all nodes of the hexagonal net coincide with some of the grid points of the square grid. Each node in the hexagonal network is represented with coordinates x,y.
The sequence gives the number of toothpicks and D-toothpicks after n steps. A182839 (first differences) gives the number added at the n-th stage.
[It appears that for this sequence a classic toothpick is a line segment of length 1 that is parallel to the y-axis. A D-toothpick is a line segment of length sqrt(2) with slope +-1. D stands for diagonal. It also appears that classic toothpicks are not placed on the y-axis. - N. J. A. Sloane, Feb 06 2023]
From Omar E. Pol, Feb 17 2023: (Start)
This cellular automaton appears to be a version on the square grid of the first quadrant of the structure of A182840.
The rules are as follows:
- The elements (toothpicks and D-toothpicks) are connected at their ends.
- At each free end of the elements of the old generation two elements of the new generation must be connected.
- The toothpicks of length 1 must always be placed vertically, i.e. parallel to the Y-axis.
- The angle between a toothpick of length 1 and a D-toothpick of length sqrt(2) that share the same node must be 135 degrees, therefore the angle between two D-toothpicks that share the same node is 90 degrees.
As a result of these rules we can see that in the odd-indexed rows of the structure are placed only the toothpicks of length 1 and in the even-indexed rows of the structure are placed the D-toothpicks of length sqrt(2).
Apart from the trapezoids, pentagons and heptagons that are adjacent to the axes of the first quadrant it appears that there are only three types of polygons:
- Regular hexagons of area 4.
- Concave decagons (or concave 10-gons) of area 8.
- Concave dodecagons (or concave 12-gons) of area 12.
There are infinitely many of these polygons.
The structure shows a fractal-like behavior as we can see in other members of the family of toothpick cellular automata.
The structure has internal growth as some members of the mentioned family. (End)

Examples

			We start at stage 0 with no toothpicks.
At stage 1 we place a D-toothpick [(0,1),(1,2)], so a(1)=1.
At stage 2 we place a toothpick [(1,2),(1,3)] and a D-toothpick [(1,2),(2,1)], so a(2)=1+2=3.
At stage 3 we place 4 elements: a D-toothpick [(1,3),(0,4)], a D-toothpick [(1,3),(2,4)], a D-toothpick [(2,1),(3,2)] and a toothpick [(2,1),(2,0)], so a(3)=3+4=7. Etc.
The first hexagon appears in the structure after 4 stages.
		

Crossrefs

See A360501 and A360512 for another hexagonal net built on the square grid. - N. J. A. Sloane, Feb 09 2023

Formula

Conjecture: a(n) = (A182840(n+1) + A267458(n+1) - 2)/4. - Omar E. Pol, Feb 10 2023

Extensions

Partially edited by N. J. A. Sloane, Feb 06 2023
a(19)-a(41) from Omar E. Pol, Feb 06 2023

A159789 a(n) = A159786(n+1)/4.

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 8, 12, 12, 13, 16, 18, 19, 26, 44, 56, 56, 57, 60, 62, 63, 70, 84, 92, 93, 98, 106, 111, 120, 152, 216, 240, 240, 241, 244, 246, 247, 254, 268, 276, 277, 282, 290, 295, 304, 336, 384, 408, 409, 414
Offset: 0

Views

Author

Omar E. Pol, Apr 28 2009, May 02 2009

Keywords

Crossrefs

Toothpick sequence: A139250.

Extensions

More terms from Colin Barker, Apr 19 2015

A153004 First differences of toothpick numbers A153003.

Original entry on oeis.org

1, 3, 3, 3, 6, 9, 6, 3, 6, 9, 9, 12, 21, 24, 12, 3, 6, 9, 9, 12, 21, 24, 15, 12, 21, 27, 30, 45, 66, 60, 24, 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, 48, 3
Offset: 1

Views

Author

Omar E. Pol, Jan 02 2009

Keywords

Examples

			Triangle begins:
1;
3,3;
3,6,9,6;
3,6,9,9,12,21,24,12;
3,6,9,9,12,21,24,15,12,21,27,30,45,66,60,24;
		

Crossrefs

Toothpick sequence: A139250.

Programs

  • Mathematica
    A139250[n_] := A139250[n] = Module[{m, k}, If[n == 0, Return[0]]; m = 2^(Length[IntegerDigits[n, 2]] - 1); k = (2 m^2 + 1)/3; If[n == m, k, k + 2 A139250[n - m] + A139250[n - m + 1] - 1]];
    b[n_] := If[n == 0, 0, (3/4) (A139250[n + 1] - 3) + 1];
    b /@ Range[0, 64] // Differences (* Jean-François Alcover, Apr 06 2020 *)

A172308 L-toothpick sequence in the first quadrant.

Original entry on oeis.org

0, 1, 3, 5, 7, 11, 15, 17, 21, 27, 33, 41, 47, 59, 69, 75, 79, 85, 95, 107, 117, 131, 145, 161, 177, 195, 209, 225, 237, 257, 279, 287, 295, 311, 329, 345, 355, 371, 391, 415, 441, 477, 501, 533, 563, 603, 631, 655
Offset: 0

Views

Author

Omar E. Pol, Feb 06 2010

Keywords

Comments

The same as A172310 and A172304, but starting from half L-toothpick in the first quadrant.
Note that if n is odd then we add the small L-toothpicks to the structure, otherwise we add the large L-toothpicks to the structure.
We start at stage 0 with half L-toothpick: A segment from (0,0) to (1,1).
At stage 1 we place a small L-toothpick at the exposed toothpick end.
At stage 2 we place two large L-toothpicks.
At stage 3 we place two small L-toothpicks.
At stage 4 we place two large L-toothpicks.
And so on...
The sequence gives the number of L-toothpicks after n stages. A172309 (the first differences) gives the number of L-toothpicks added at the n-th stage.

Crossrefs

Extensions

a(17)-a(47) from Robert Price, Jun 17 2019

A160727 a(n) = A161415(n+1)/4.

Original entry on oeis.org

2, 3, 7, 3, 9, 9, 23, 3, 9, 9, 27, 9, 27, 27, 73, 3, 9, 9, 27, 9, 27, 27, 81, 9, 27, 27, 81, 27, 81, 81, 227, 3, 9, 9, 27, 9, 27, 27, 81, 9, 27, 27, 81, 27, 81, 81, 243, 9, 27, 27, 81, 27, 81, 81, 243, 27, 81, 81, 243, 81, 243, 243, 697, 3, 9, 9, 27, 9
Offset: 1

Views

Author

Omar E. Pol, Jun 13 2009

Keywords

Examples

			From _Omar E. Pol_, Jan 01 2014: (Start)
Written as an irregular triangle in which row lengths is A000079 the sequence begins:
2;
3,7;
3,9,9,23;
3,9,9,27,9,27,27,73;
3,9,9,27,9,27,27,81,9,27,27,81,27,81,81,227;
3,9,9,27,9,27,27,81,9,27,27,81,27,81,81,243,9,27,27,81,27, 81,81,243,27,81,81,243,81,243,243,697;
(End)
		

Crossrefs

Programs

  • Mathematica
    A160727[n_]:=3^DigitCount[n,2,1]-If[IntegerQ[Log2[n+1]],(n+1)/2,0];Array[A160727,100] (* Paolo Xausa, Sep 01 2023 *)

Formula

a(n) = A048883(n), except a(n) = A048883(n) - (n+1)/2 if n is a power of 2 minus 1. - Omar E. Pol, Jan 06 2014

Extensions

a(11)-a(58) from M. F. Hasler, Dec 03 2012
a(59)-a(68) from Omar E. Pol, Jan 06 2014

A168112 Toothpick sequence starting with a straight line, with angle = Pi/4, from which protrudes a half toothpick.

Original entry on oeis.org

0, 1, 2, 4, 7, 10, 13, 19, 26, 32, 35, 41, 48, 56, 65, 81, 98, 108, 111, 117, 124, 132, 141, 157, 174, 186, 195, 211, 230, 252, 283, 329, 370, 388, 391, 397, 404, 412, 421, 437, 454, 466, 475, 491, 510, 532, 563, 609, 650, 670
Offset: 0

Views

Author

Omar E. Pol, Dec 07 2009

Keywords

Comments

On the infinite square grid, we start at round 0 drawing a straight line, with angle = Pi/4, from which protrudes a half toothpick.
At round 1 we place an orthogonal toothpick centered at the end.
In each subsequent round, for every exposed toothpick end, place an orthogonal toothpick centered at that end.
The sequence gives the number of toothpicks after n rounds.
See also A168113, the first differences.
For more information see A139250, which is the main entry for this sequence.

Crossrefs

Formula

a(n) = A160730(n)/2. [From Nathaniel Johnston, Mar 28 2011]

Extensions

Terms after a(34) from Nathaniel Johnston, Mar 28 2011
Previous Showing 11-20 of 31 results. Next