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

A293144 Number of vertices in a Menger Sponge constructed from a cubic lattice: a(n) = 20*a(n-1) - 24*A293143(n-1).

Original entry on oeis.org

8, 64, 896, 15616, 295808, 5789440, 114790784, 2287878400, 45694209920, 913377753856, 18263504780672, 365237697021184, 7304494763023232, 146087821875273472, 2921739850525976960, 58434664314989709568, 1168692224736473884544
Offset: 0

Views

Author

Steven Beard, Oct 01 2017

Keywords

Comments

a(n) is the number of vertices of a (3^n+1)^3 cubic lattice minus the number of vertices missing for the openings within the sponge. The cubic honeycomb can be constructed by joining 20 cubes of the previous term and subtracting the overlapping vertices of 24 faces (see example).

Examples

			For a(0) we start with a simple cube, having a(0) = 8 corners.
For a(1), the cube is subdivided into 27 smaller cubes forming a lattice of 64 vertices. 7 cubes are removed (but the cubes have no facial or internal vertices to remove until the next stage).
Twenty a(1) cubes, each with 64 vertices, are then combined to form the lattice for a(2). The overlapped vertices of 24 faces (each with 16 vertices) are removed. Thus a(2) = (20*64) - (24*16) = 1280 - 384 = 896. The faces of the cubes are the Sierpinski Carpet grid of A293143.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[8 (1 - 24 x + 131 x^2 - 156 x^3)/((1 - x) (1 - 3 x) (1 - 8 x) (1 - 20 x)), {x, 0, 15}], x] (* Michael De Vlieger, Oct 09 2017 *)
  • PARI
    Vec(8*(1 - 24*x + 131*x^2 - 156*x^3) / ((1 - x)*(1 - 3*x)*(1 - 8*x)*(1 - 20*x)) + O(x^30)) \\ Colin Barker, Oct 09 2017
    
  • PARI
    A293144(n)=(255+133*3^(n+1)+63*4^n*5^(n+1)+3553*8^(n-1))*64/11305 \\ M. F. Hasler, Oct 16 2017

Formula

From Colin Barker, Oct 02 2017, adjusted for initial a(0) = 8 by M. F. Hasler, Oct 16 2017: (Start)
G.f.: 8*(1 - 24*x + 131*x^2 - 156*x^3) / ((1 - x)*(1 - 3*x)*(1 - 8*x)*(1 - 20*x)).
a(n) = 64*(3/133 + 3^(1+n)/85 + 11*8^(n-1)/35 + 9*20^n/323).
a(n) = 32*a(n-1) - 275*a(n-2) + 724*a(n-3) - 480*a(n-4) for n > 3.
(End)
a(n) = (64*(133*3^(n+1) + 63*4^n*5^(n+1) + 3553*8^(n-1) + 255)) / 11305.

Extensions

Edited to include initial term 8 by M. F. Hasler, Oct 16 2017

A153490 Sierpinski carpet, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1
Offset: 1

Views

Author

Roger L. Bagula, Dec 27 2008

Keywords

Comments

The Sierpinski carpet is the fractal obtained by starting with a unit square and at subsequent iterations, subdividing each square into 3 X 3 smaller squares and removing (from nonempty squares) the middle square. After the n-th iteration, the upper-left 3^n X 3^n squares will always remain the same. Therefore this sequence, which reads these by antidiagonals, is well-defined.
Row sums are {1, 2, 2, 4, 5, 4, 6, 6, 4, 8, 10, 8, ...}.

Examples

			The Sierpinski carpet matrix reads
   1 1 1 1 1 1 1 1 1 ...
   1 0 1 1 0 1 1 0 1 ...
   1 1 1 1 1 1 1 1 1 ...
   1 1 1 0 0 0 1 1 1 ...
   1 0 1 0 0 0 1 0 1 ...
   1 1 1 0 0 0 1 1 1 ...
   1 1 1 1 1 1 1 1 1 ...
   1 0 1 1 0 1 1 0 1 ...
   1 1 1 1 1 1 1 1 1 ...
   (...)
so the antidiagonals are
  {1},
  {1, 1},
  {1, 0, 1},
  {1, 1, 1, 1},
  {1, 1, 1, 1, 1},
  {1, 0, 1, 1, 0, 1},
  {1, 1, 1, 0, 1, 1, 1},
  {1, 1, 1, 0, 0, 1, 1, 1},
  {1, 0, 1, 0, 0, 0, 1, 0, 1},
  {1, 1, 1, 1, 0, 0, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1},
  {1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1},
  ...
		

Crossrefs

Cf. A292688 (n-th antidiagonal concatenated as binary number), A292689 (decimal representation of these binary numbers).
Cf. A293143 (number of vertex points in a Sierpinski Carpet).

Programs

  • Mathematica
    << MathWorld`Fractal`; fractal = SierpinskiCarpet;
    a = fractal[4]; Table[Table[a[[m]][[n - m + 1]], {m, 1, n}], {n, 1, 12}];
    Flatten[%]
  • PARI
    A153490_row(n,A=Mat(1))={while(#AM. F. Hasler, Oct 23 2017

Extensions

Edited by M. F. Hasler, Oct 20 2017

A293834 Triangle whose n-th row lists the squares to be removed at the n-th iteration of the construction of the Sierpinski carpet.

Original entry on oeis.org

5, 11, 14, 17, 38, 44, 65, 68, 71, 29, 32, 35, 38, 41, 44, 47, 50, 53, 110, 116, 119, 125, 128, 134, 191, 194, 197, 200, 203, 206, 209, 212, 215, 272, 275, 278, 290, 293, 296, 353, 359, 371, 377, 434, 437, 440, 452, 455, 458, 515, 518, 521, 524, 527, 530, 533, 536, 539, 596
Offset: 1

Views

Author

M. F. Hasler, Oct 16 2017

Keywords

Comments

The Sierpinski carpet is constructed starting from the unit square, and removing in the next iteration the middle piece of the square cut into 3 X 3 smaller squares. The same operation is applied to each square not yet removed, in subsequent iterations.
At the n-th iteration, the initial unit square is subdivided in 3^n X 3^n smaller squares. The present sequence gives the numbers (from 1 to 9^n) of the newly removed subsquares, cf. examples.
The n-th row has A001018(n) = 8^n terms.

Examples

			At the first iteration, the middle square, which is the 5th of the 9 squares, is removed, so the first row reads [5]. This leaves 9 - 1 = 8 squares.
At the next iteration, in each of the 8 remaining squares, each one subdivided into 3 X 3 smaller squares, the middle square is removed. The numbers of these subsquares are 11, 14 and 17 in the second row, 38 and 44 in the middle row, and 65, 68 and 71 in the penultimate row, so row 2 = [11, 14, 17, 38, 44, 65, 68, 71]. (The subsquares are numbered from 1 to 81, i.e., all of the 9 X 9 subsquares, including the "empty" ones, get a number. Otherwise said, the number of a square equals (y-1)*3^n+x, if x,y are the coordinates both ranging from 1 to 3^n.)
This leaves 8*9 - 8 = 8*(9 - 1) = 64 "nonempty" squares. Therefore, the next row has 64 terms. The first 9 of these correspond to the 2nd, 5th, 8th, ... square of the 2nd row, i.e., numbers 29, 32, ..., 53, in steps of 3. The next two terms are the numbers of the 2nd and not the 5th, but the 8th square of the 5th row, thus 4*27 + 2 = 110 and 116.
		

Crossrefs

Programs

  • PARI
    {A293834_row(n,B=[0],u=vector(8,i,1))=for(k=2,n, my(v=vector(8,j,if(j>3,if(j>5,j-6+2*3^k,j*2-8+3^k),j-1))); B=concat(apply(t->t*u+v,B+B\3^k*3^k*2))*3);apply(t->t+3^n+2,Set(B))}

A381517 Perimeter of the Sierpiński carpet at iteration n.

Original entry on oeis.org

4, 16, 80, 496, 3536, 26992, 212048, 1684720, 13442768, 107437168, 859182416, 6872514544, 54977282000, 439809752944, 3518452514384, 28147543587568, 225180119118032, 1801440264196720, 14411520047331152, 115292154179921392, 922337214843187664, 7378697662956950896, 59029581136289955920, 472236648588222693616
Offset: 0

Views

Author

Jakub Buczak, Feb 26 2025

Keywords

Comments

Carpet n has an overall size 3^n X 3^n and the perimeter here includes the perimeter of all holes within it.
Carpet n=0 is a unit square and has perimeter a(0) = 4.
Carpet n can be constructed by arranging 8 copies of carpet n-1 in a square with a hole in the middle,
X X X
X X
X X X
There are no gaps in each side so 2 sides of each n-1 are now not on the perimeter so a(n) = 8*a(n-1) - 16*3^(n-1).
An equivalent construction is to replace each of the 8^(n-1) unit squares of carpet n-1 with a 3 X 3 block of unit squares with a hole in the middle, so that a(n) = 3*a(n-1) + 4*8^(n-1).
A fractal is obtained by scaling the whole carpet down to a unit square and its scaled perimeter a(n)/3^n -> oo shows the perimeter is infinite even though the area is bounded.

Examples

			For n=0, a(0) = 4, the geometric representation is a square.
For n=3, a(3) = 496.
		

Crossrefs

Cf. A113210 (fractal dimension).

Programs

  • Python
    a = lambda n: (4 * (4 * 3**n + 8**n)) // 5

Formula

a(n) = (4/5)*(4*3^n + 8^n).
a(n) = A365606(n+1) - 4.
Showing 1-4 of 4 results.