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.

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

A292689 Decimal values of the antidiagonals of the Sierpinski carpet considered as binary numbers.

Original entry on oeis.org

1, 3, 5, 15, 31, 45, 119, 231, 325, 975, 2015, 2925, 8191, 16383, 23405, 61431, 118759, 166725, 499151, 1030623, 1495405, 4186623, 8372735, 11960685, 31392247, 60686823, 85197125, 255591375, 528222175, 766774125, 2147229695, 4294721535, 6135503725, 16103829495, 31132078055
Offset: 1

Views

Author

M. F. Hasler, Oct 23 2017

Keywords

Comments

Term a(n) is the decimal value of A292688 = concatenation of the terms in row n of A153490 considered as a binary number.
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 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 considers the antidiagonals of this infinite matrix, is well-defined.
The n-th term a(n) has n binary digits.
The Hamming weights of the terms (also row sums of A153490) are (1, 2, 2, 4, 5, 4, 6, 6, 4, 8, 10, 8, 13, 14, 10, 14, 13, 8, 14, 16, 12, 18, 18, 12, 16, ...).

Examples

			The Sierpinski carpet matrix A153490 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 ...
   ...
The concatenation of the terms in the antidiagonals yields A292688 = (1, 11, 101, 1111, 11111, 101101, 1110111, 11100111, 101000101, 1111001111, 11111011111, 101101101101, 1111111111111, 11111111111111, 101101101101101, ...).
Considered as binary numbers and converted to base 10, this yields 1, 3, 5, 15, 31, 45, 119, 231, 325, ... .
		

Crossrefs

Programs

  • Mathematica
    A292689[i_]:=With[{a=Nest[ArrayFlatten[{{#,#,#},{#,0,#},{#,#,#}}]&,{{1}},i]},Array[FromDigits[Diagonal[a,#],2]&,3^i,1-3^i]];A292689[4] (* Generates 3^4 terms *) (* Paolo Xausa, May 13 2023 *)
  • PARI
    A292689(n,A=Mat(1))={while(#A
    				

Formula

a(k+1) = 2*a(k)+1 for all k in A003462 = (1, 4, 13, 40, 121, 364, ...). (Conjectured.) - R. J. Cano, Oct 25 2017
This is true, moreover, a(k) = 2^k-1 for these k (and k' = k+1), and the neighboring antidiagonals (k-1 and k+2) have bitmaps of the form {101}*(101 repeated). - M. F. Hasler, Oct 25 2017

A293974 Row sums of antidiagonals of the Sierpinski carpet A153490.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 6, 6, 4, 8, 10, 8, 13, 14, 10, 14, 13, 8, 14, 16, 12, 18, 18, 12, 16, 14, 8, 16, 20, 16, 26, 28, 20, 28, 26, 16, 29, 34, 26, 40, 41, 28, 38, 34, 20, 34, 38, 28, 41, 40, 26, 34, 29, 16, 30, 36, 28, 44, 46, 32, 44, 40, 24, 42, 48, 36, 54, 54, 36, 48, 42, 24
Offset: 1

Views

Author

M. F. Hasler, Oct 24 2017

Keywords

Comments

Also, sums of digits of terms of A292688, or Hamming weights of terms of A292689. See there or A153490 for definition / construction of the Sierpiski carpet.

Crossrefs

Programs

  • Mathematica
    A293974[i_]:=With[{a=Nest[ArrayFlatten[{{#,#,#},{#,0,#},{#,#,#}}]&,{{1}},i]},Array[Total[Diagonal[a,#]]&,3^i,1-3^i]];A293974[5] (* Generates 3^5 terms *) (* Paolo Xausa, May 14 2023 *)
  • PARI
    A293974(n,A=Mat(1))={while(#A
    				

Formula

a(n) = A007953(A292688(n)) = A000120(A292689(n)) = sum(k=1..n, A153490(n,k)), considering A153490 as triangle; could also be indexed as matrix (m,n = 1,...,oo) or "flattened" (linearized) using A000217.

A293973 Sierpinski carpet iterations: start with a(0) = 1; read a(n) as a 3^n X 3^n binary matrix, replace 1 with [111;101;111] and 0 with [000;000;000], concatenate the 3^(n+1) rows of the new matrix.

Original entry on oeis.org

1, 111101111, 111111111101101101111111111111000111101000101111000111111111111101101101111111111
Offset: 0

Views

Author

M. F. Hasler, Oct 20 2017

Keywords

Comments

The term a(n) has 9^n = A001019(n) digits.
See A153490 for the Sierpinski carpet seen as an infinite matrix read by antidiagonals, and A292688 for a variant where the digits on the antidiagonals are concatenated.
See A292686 for a 1-dimensional variant.

Examples

			Consider a(0) = 1 as a 1 X 1 matrix, replace the 1 by the 3 X 3 matrix E = [1,1,1; 1,0,1; 1,1,1], then this matrix is the result. Concatenating all elements yields a(1) = concat(111,101,111) = 111101111.
Now reconsider a(1) as the previously given 3 X 3 matrix E. Replace every 1 by that same matrix E. This yields the 9 X 9 matrix
   [ 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 ].
Concatenating all elements yields a(2) = 111111111101101101111111111111000111101000101111000111111111111101101101111111111.
		

Crossrefs

Cf. A153490, A293834, A001019, A292688 (antidiagonals 1..3^n of the term a(n) seen as 3^n X 3^n matrix), A292686 (1-dim. variant).

Programs

  • Mathematica
    A293973[n_]:=FromDigits[Flatten[Nest[ArrayFlatten[{{#,#,#},{#,0,#},{#,#,#}}]&,{{1}},n]]];Array[A293973,4,0] (* Paolo Xausa, May 12 2023 *)
  • PARI
    a(n,A=Mat(1),E=2^9-1-2^4)={for(k=1,n, A=matrix(3^k,3^k, i,j, A[(i+2)\3,(j+2)\3]&&bittest(E,(i-1)%3*3+(j-1)%3)));fromdigits(apply(t->fromdigits(t~,10),Vec(A)),10^3^n)}
Showing 1-4 of 4 results.