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.

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

This page as a plain text file.
%I A293834 #26 Nov 11 2019 21:36:44
%S A293834 5,11,14,17,38,44,65,68,71,29,32,35,38,41,44,47,50,53,110,116,119,125,
%T A293834 128,134,191,194,197,200,203,206,209,212,215,272,275,278,290,293,296,
%U A293834 353,359,371,377,434,437,440,452,455,458,515,518,521,524,527,530,533,536,539,596
%N A293834 Triangle whose n-th row lists the squares to be removed at the n-th iteration of the construction of the Sierpinski carpet.
%C A293834 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.
%C A293834 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.
%C A293834 The n-th row has A001018(n) = 8^n terms.
%H A293834 M. F. Hasler, <a href="/A293834/b293834.txt">Table of n, a(n) for n = 1..585</a>
%H A293834 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sierpinski_carpet">Sierpinski carpet</a>
%e A293834 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.
%e A293834 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.)
%e A293834 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.
%o A293834 (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))}
%Y A293834 Cf. A001018, A153490, A293143.
%K A293834 nonn
%O A293834 1,1
%A A293834 _M. F. Hasler_, Oct 16 2017