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.
%I A293143 #52 Feb 16 2025 08:33:51 %S A293143 4,16,96,688,5280,41584,330720,2639920,21101856,168762352,1349941344, %T A293143 10799058352,86391049632,691124145520,5528980409568,44231805012784, %U A293143 353854325311008,2830834258114288,22646673031792992,181173381154980016 %N A293143 Number of vertex points in a Sierpinski Carpet grid subdivided into squares: a(n+1) = 8*a(n) - 8*(3^n+1), a(0) = 4. %C A293143 Figurate number sequence for the Sierpinski Carpet lattice. See the faces of the cubes in "Image 2" in the Wikipedia link of A293144 for an example of the construction grid of the Sierpinski Carpet. %H A293143 Colin Barker, <a href="/A293143/b293143.txt">Table of n, a(n) for n = 0..1000</a> (Recomputed by M. F. Hasler to include the initial term 4.) %H A293143 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SierpinskiCarpet.html">Sierpinski Carpet</a>. %H A293143 Wikipedia, <a href="http://en.wikipedia.org/wiki/Sierpinski_carpet">Sierpinski carpet</a>. %H A293143 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (12,-35,24). %F A293143 From _Colin Barker_, Oct 02 2017, corrected for a(0) = 4 by _M. F. Hasler_, Oct 16 2017: (Start) %F A293143 G.f.: 4*(1 - 8*x + 11*x^2) / ((1 - x)*(1 - 3*x)*(1 - 8*x)). %F A293143 a(n) = 8*(5 + 11*2^(3*n-1) + 7*3^n) / 35. %F A293143 a(n) = 12*a(n-1) - 35*a(n-2) + 24*a(n-3) for n > 2. (End) %e A293143 The carpet is formed by squares within a square grid. The initial term is a(0) = 4 for the corners of the unit square. For n = 1 there are 3 X 3 squares, the middle one being open (empty), with 16 vertex points. At the next stage of recursion, these become eight squares with open center, now based on a square of 10 X 10 points. The remaining center square is empty, missing 4 points, thus the next term is 100 - 4 = 96 for a(2). In the next stage there are 8 squares missing 4 points and the new center is missing 64, thus the 28 square grid now has 784 - 32 - 64 = 688 for a(3). This carpet sequence becomes the faces for the cubes in the Menger Sponge recursion of A293144. %t A293143 FoldList[8 #1 - 8 (3^(#2-1) + 1) &, 4, Range@ 18] (* _Michael De Vlieger_, Oct 02 2017 *) %o A293143 (PARI) prev=4; concat(prev, vector(20, n, prev=8*prev-8*(3^(n-1)+1))) \\ _Colin Barker_, Oct 08 2017 %o A293143 (PARI) Vec(4*(1 - 8*x + 11*x^2)/((1 - x)*(1 - 3*x)*(1 - 8*x)) + O(x^30)) \\ _Colin Barker_, Oct 09 2017 %o A293143 (PARI) A293143(n)=8*(5+11*2^(3*n-1)+7*3^n)/35 \\ _M. F. Hasler_, Oct 16 2017 %Y A293143 Cf. A293144, A034472. %K A293143 nonn,easy %O A293143 0,1 %A A293143 _Steven Beard_, Oct 01 2017 %E A293143 Edited to start with a(0) = 4 by _M. F. Hasler_, Oct 16 2017