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 A381517 #80 Mar 02 2025 08:02:32 %S A381517 4,16,80,496,3536,26992,212048,1684720,13442768,107437168,859182416, %T A381517 6872514544,54977282000,439809752944,3518452514384,28147543587568, %U A381517 225180119118032,1801440264196720,14411520047331152,115292154179921392,922337214843187664,7378697662956950896,59029581136289955920,472236648588222693616 %N A381517 Perimeter of the Sierpiński carpet at iteration n. %C A381517 Carpet n has an overall size 3^n X 3^n and the perimeter here includes the perimeter of all holes within it. %C A381517 Carpet n=0 is a unit square and has perimeter a(0) = 4. %C A381517 Carpet n can be constructed by arranging 8 copies of carpet n-1 in a square with a hole in the middle, %C A381517 X X X %C A381517 X X %C A381517 X X X %C A381517 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). %C A381517 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). %C A381517 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. %H A381517 Jakub Buczak, <a href="https://zenodo.org/records/14933173">Perimeter of the Sierpiński Carpet</a> %H A381517 Michael Small, Brendan Florio, and Phillip Donald Fawell, <a href="https://doi.org/10.1016/j.powtec.2018.11.030">The use of the perimeter area method to calculate the fractal dimension of aggregates</a>, see section 3.2 equation (27) where a(n) = P_s(n+1) with scale factor g_1 = 1. %H A381517 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SierpinskiCarpet.html">Sierpiński Carpet</a> %F A381517 a(n) = (4/5)*(4*3^n + 8^n). %F A381517 a(n) = A365606(n+1) - 4. %e A381517 For n=0, a(0) = 4, the geometric representation is a square. %e A381517 For n=3, a(3) = 496. %o A381517 (Python) %o A381517 a = lambda n: (4 * (4 * 3**n + 8**n)) // 5 %Y A381517 Cf. A001018, A271939, A293143, A365606. %Y A381517 Cf. A113210 (fractal dimension). %K A381517 nonn,easy %O A381517 0,1 %A A381517 _Jakub Buczak_, Feb 26 2025