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 41-50 of 235 results. Next

A182633 Number of toothpicks added at n-th stage in the toothpick structure of A182632.

Original entry on oeis.org

0, 3, 6, 12, 12, 12, 24, 36, 24, 12, 24, 48, 60, 48, 60, 84, 48, 12, 24, 48, 60, 60, 84, 132, 132, 72, 60, 120, 168, 144, 156, 192, 96, 12, 24, 48, 60, 60, 84, 132, 132, 84, 84, 156, 228, 228, 228
Offset: 0

Views

Author

Omar E. Pol, Dec 07 2010

Keywords

Comments

First differences of A182632.
a(n) is also the number of components added at n-th stage in the toothpick structure formed by V-toothpicks with an initial Y-toothpick, since a V-toothpick has two components and a Y-toothpick has three components (For more information see A161206, A160120, A161644).

Examples

			From _Omar E. Pol_, Feb 08 2013 (Start):
When written as a triangle:
0;
3;
6;
12,12;
12,24,36,24;
12,24,48,60,48,60, 84, 48;
12,24,48,60,60,84,132,132,72,60,120,168,144,156,192,96;
12,24,48,60,60,84,132,132,84,84,156,228,228,228,...
...
It appears that positive terms of the right border are A007283.
(End)
		

Crossrefs

Formula

It appears that a(n) = 2*A161645(n) but with a(1)=3.
a(n) = 3*A182635(n). - Omar E. Pol, Feb 09 2013

A159786 Total area of all squares and rectangles after n-th stage in the toothpick structure of A139250, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 0, 4, 8, 8, 12, 32, 48, 48, 52, 64, 72, 76, 104, 176, 224, 224, 228, 240, 248, 252, 280, 336, 368, 372, 392, 424, 444, 480, 608, 864, 960, 960, 964, 976, 984, 988, 1016, 1072, 1104, 1108, 1128, 1160, 1180, 1216, 1344, 1536, 1632, 1636, 1656
Offset: 0

Views

Author

Omar E. Pol, Apr 28 2009

Keywords

Comments

Note that if n > 1 is a power of 2 then a(n) = n^2 - 2n.

Crossrefs

Formula

a(2^k) = A211012(k). - Omar E. Pol, Sep 25 2012

Extensions

More terms from Omar E. Pol, Sep 25 2012

A160117 Number of "ON" cells after n-th stage in simple 2-dimensional cellular automaton (see Comments for precise definition).

Original entry on oeis.org

0, 1, 9, 13, 41, 49, 101, 113, 189, 205, 305, 325, 449, 473, 621, 649, 821, 853, 1049, 1085, 1305, 1345, 1589, 1633, 1901, 1949, 2241, 2293, 2609, 2665, 3005, 3065, 3429, 3493, 3881, 3949, 4361, 4433, 4869, 4945, 5405, 5485, 5969, 6053, 6561, 6649, 7181, 7273
Offset: 0

Views

Author

Omar E. Pol, May 05 2009, May 15 2009

Keywords

Comments

Define "peninsula cell" to be the "ON" cell connected to the structure by exactly one of its vertices.
Define "bridge cell" to be the "ON" cell connected to two cells of the structure by exactly consecutive two of its vertices.
On the infinite square grid, we start at stage 0 with all cells in OFF state. At stage 1, we turn ON a single cell, in the central position.
In order to construct this sequence we use the following rules:
- If n is even, we turn "ON" the cells around the cells turned "ON" at the generation n-1.
- If n is odd, we turn "ON" the possible bridge cells and the possible peninsula cells.
- Everything that is already ON remains ON.
A160411, the first differences, gives the number of cells turned "ON" at n-th stage.

Examples

			If we label the generations of cells turned ON by consecutive numbers we get the cell pattern shown below:
9...9...9...9...9
.888.888.888.888.
.878.878.878.878.
.886668666866688.
9..656.656.656..9
.886644464446688.
.878.434.434.878.
.886644222446688.
9..656.212.656..9
.886644222446688.
.878.434.434.878.
.886644464446688.
9..656.656.656..9
.886668666866688.
.878.878.878.878.
.888.888.888.888.
9...9...9...9...9
At the first generation, only the central "1" is ON, so a(1) = 1. At the second generation, we turn ON eight cells around the central cell, leading to a(2) = a(1)+8 = 9. At the third generation, we turn ON four peninsula cells, so a(3) = a(2)+4 = 13. At the fourth generation, we turn ON the cells around the cells turned ON at the third generation, so a(4) = a(3)+28 = 41. At the 5th generation, we turn ON four peninsula cells and four bridge cells, so a(5) = a(4)+8 = 49.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local r;
          r:= irem(n, 2);
          `if`(n<2, n, 5+(n-r)*((7*n-3*r)/2-5))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Sep 16 2011
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], (7n^2 - 10n + 10)/2, (7n^2 - 20n + 23)/2]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jul 16 2015, after Nathaniel Johnston *)

Formula

a(2n) = 5 + 2n(7n-5) for n>=1, a(2n+1) = 5 + 2n(7n-3) for n>=1. - Nathaniel Johnston, Nov 06 2010
G.f.: x*(x^2+1)*(4*x^3+x^2+8*x+1)/((x+1)^2*(1-x)^3). - Alois P. Heinz, Sep 16 2011

Extensions

a(10) - a(27) from Nathaniel Johnston, Nov 06 2010
a(28) - a(47) from Alois P. Heinz, Sep 16 2011

A161645 First differences of A161644: number of new ON cells at generation n of the triangular cellular automaton described in A161644.

Original entry on oeis.org

0, 1, 3, 6, 6, 6, 12, 18, 12, 6, 12, 24, 30, 24, 30, 42, 24, 6, 12, 24, 30, 30, 42, 66, 66, 36, 30, 60, 84, 72, 78, 96, 48, 6, 12, 24, 30, 30, 42, 66, 66, 42, 42, 78, 114, 114, 114, 150, 138, 60, 30, 60, 84, 90, 114, 174, 198, 132, 90, 144, 210, 192, 192, 210, 96, 6, 12, 24
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Jun 15 2009

Keywords

Comments

See the comments in A161644.
It appears that a(n) is also the number of V-toothpicks or Y-toothpicks added at the n-th stage in a toothpick structure on hexagonal net, starting with a single Y-toothpick in stage 1 and adding only V-toothpicks in stages >=2 (see A161206, A160120, A182633). - Omar E. Pol, Dec 07 2010

Examples

			From _Omar E. Pol_, Apr 08 2015: (Start)
The positive terms written as an irregular triangle in which the row lengths are the terms of A011782:
1;
3;
6,6;
6,12,18,12;
6,12,24,30,24,30,42,24;
6,12,24,30,30,42,66,66,36,30,60,84,72,78,96,48;
6,12,24,30,30,42,66,66,42,42,78,114,114,114,150,138,60,30,60,84,90,114,174,198,132,90,144,210,192,192,210,96;
...
It appears that the right border gives A003945.
(End)
		

References

  • R. Reed, The Lemming Simulation Problem, Mathematics in School, 3 (#6, Nov. 1974), front cover and pp. 5-6. [Describes the dual structure where new triangles are joined at vertices rather than edges.]

Crossrefs

A194701 Number of toothpicks or D-toothpicks added at n-th stage to the structure of A194700.

Original entry on oeis.org

0, 1, 4, 8, 16, 22, 24, 22, 40, 40, 32, 32, 56, 74, 96, 66
Offset: 0

Views

Author

Omar E. Pol, Sep 02 2011

Keywords

Comments

Essentially the first differences of A194700. First differs from A194271 at a(15). Conjecture: this sequence and A194271 have infinitely many numbers in common.

Crossrefs

A220521 Number of toothpicks or D-toothpicks added at n-th stage in the toothpick structure of A220520.

Original entry on oeis.org

1, 2, 4, 4, 4, 4, 8, 8, 4, 4, 8, 12, 16, 12, 16, 16, 4, 4, 8, 12, 16, 20, 24, 26, 24, 12, 20, 32, 40, 28, 32, 32, 4, 4, 8, 12, 16, 20, 24, 26, 24, 20, 32, 44, 64, 52, 48, 54, 40, 12, 20, 36, 48, 56, 64, 74, 76, 30, 44, 72, 88, 60, 64, 64, 4, 4, 8, 12
Offset: 1

Views

Author

Omar E. Pol, Dec 15 2012

Keywords

Comments

From Omar E. Pol, Apr 26 2020: (Start)
The cellular automaton described in A220520 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 of length 1, and the even-indexed columns (b) contain numbers of the D-toothpicks.
For further information about the "word" of a cellular automaton see A296612. (End)

Examples

			Written as an irregular triangle the sequence begins:
1,2;
4,4;
4,4,8,8;
4,4,8,12,16,12,16,16;
4,4,8,12,16,20,24,26,24,12,20,32,40,28,32,32;
4,4,8,12,16,20,24,26,24,20,32,44,64,52,48,54,40,12,20,...
Triangle reformatted by _Omar E. Pol_, Apr 26 2020
		

Crossrefs

First differences of A220520.
First differs from A194441 at a(14).
Columns 1-3: A123932, A040002, A010731.

Extensions

0 removed and offset changed by Omar E. Pol, Apr 26 2020

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

A105321 Convolution of binomial(1,n) and Gould's sequence A001316.

Original entry on oeis.org

1, 3, 4, 6, 6, 6, 8, 12, 10, 6, 8, 12, 12, 12, 16, 24, 18, 6, 8, 12, 12, 12, 16, 24, 20, 12, 16, 24, 24, 24, 32, 48, 34, 6, 8, 12, 12, 12, 16, 24, 20, 12, 16, 24, 24, 24, 32, 48, 36, 12, 16, 24, 24, 24, 32, 48, 40, 24, 32, 48, 48, 48, 64, 96, 66, 6, 8, 12, 12, 12, 16, 24, 20, 12, 16
Offset: 0

Views

Author

Paul Barry, Apr 01 2005

Keywords

Comments

A universal function related to the spherical growth of repeated truncations of maps.
a(n) = (number of ones in row n of triangle A249133) = (number of odd terms in row n of triangle A249095) = A000120(A249184(n)). - Reinhard Zumkeller, Nov 14 2014

Examples

			From _Omar E. Pol_, May 29 2010: (Start)
If written as a triangle:
  1;
  3;
  4;
  6,6;
  6,8,12,10;
  6,8,12,12,12,16,24,18;
  6,8,12,12,12,16,24,20,12,16,24,24,24,32,48,34;
  6,8,12,12,12,16,24,20,12,16,24,24,24,32,48,36,12,16,24,24,24,32,48,40,24,32,48,48,48,64,96,66; (End)
		

Crossrefs

Programs

  • Haskell
    a105321 n = if n == 0 then 1 else a001316 n + a001316 (n - 1)
    -- Reinhard Zumkeller, Nov 14 2014
    
  • Maple
    nmax := 74: A001316 := n -> if n <= -1 then 0 else 2^add(i, i=convert(n, base, 2)) fi: for p from 0 to ceil(log[2](nmax)) do for n from 1 to nmax/(p+2)+1 do a((2*n-1)*2^p) := (2^p+2)  * A001316(n-1) od: od: a(0) :=1: seq(a(n), n=0..nmax); # Johannes W. Meijer, Jan 28 2013
  • Mathematica
    f[n_] := Sum[Binomial[1, n - k]Mod[Binomial[k, j], 2], {k, 0, n}, {j, 0, k}]; Array[f, 75, 0] (* Robert G. Wilson v, Jun 28 2010 *)
  • PARI
    a(n) = sum(k=0, n, binomial(1, n-k)*sum(j=0, k, binomial(k, j) % 2)); \\ Michel Marcus, Apr 29 2018
    
  • Python
    def A105321(n): return (1<Chai Wah Wu, Jul 30 2025
    
  • Python
    # (fast way for big vectors)
    import numpy # (version >= 2.0.0)
    n_up_to = 2**22
    A000079 = 1 << numpy.arange(n_up_to.bit_length())
    A001316 = A000079[(numpy.bitwise_count(numpy.arange(n_up_to)))]
    A105321 = A001316
    A105321[1:] += A001316[0:-1]
    print(A105321[0:100]) # Karl-Heinz Hofmann, Aug 01 2025

Formula

G.f. (1+x)*Product{k>=0, 1+2x^(2^k)};
a(n) = Sum_{k=0..n, binomial(1, n-k)*Sum_{j=0..k, binomial(k, j) mod 2}}.
a(n) = 2*A048460(n) for n>=2. - Omar E. Pol, Jan 02 2011
a((2*n-1)*2^p) = (2^p+2)*A001316(n-1), p >= 0 and n >= 1, with a(0) = 1. - Johannes W. Meijer, Jan 28 2013
a(n) = A001316(n) + A001316(n-1) for n > 0. - Reinhard Zumkeller, Nov 14 2014

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)

A160420 Number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton whose skeleton is the same network as the toothpick structure of A139250 but with toothpicks of length 4.

Original entry on oeis.org

0, 5, 13, 27, 41, 57, 85, 123, 149, 165, 193, 233, 277, 337, 429, 527, 577, 593, 621, 661, 705, 765, 857, 957, 1025, 1085, 1181, 1305, 1453, 1665, 1945, 2187, 2285, 2301, 2329, 2369, 2413, 2473, 2565, 2665, 2733, 2793, 2889, 3013, 3161, 3373, 3653, 3897, 4013
Offset: 0

Views

Author

Omar E. Pol, May 13 2009, May 18 2009

Keywords

Comments

a(n) is also the number of grid points that are covered after n-th stage by an polyedge as the toothpick structure of A139250, but with toothpicks of length 4.

Examples

			a(2)=13:
.o-o-o-o-o
.....|....
.....o....
.....|....
.....o....
.....|....
.....o....
.....|....
.o-o-o-o-o
		

Crossrefs

Formula

Conjecture: a(n) = A147614(n)+2*A139250(n). [From R. J. Mathar, Jan 22 2010]
The above conjecture is true: each toothpick covers exactly two more grid points than the corresponding toothpick in A147614.

Extensions

Definition revised by N. J. A. Sloane, Jan 02 2010.
Formula verified and more terms from Nathaniel Johnston, Nov 13 2010
Previous Showing 41-50 of 235 results. Next