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 A238976 #38 Feb 16 2025 08:33:21 %S A238976 0,1,16,169,1600,14641,132496,1194649,10758400,96845281,871666576, %T A238976 7845176329,70607118400,635465659921,5719195722256,51472775849209, %U A238976 463255025689600,4169295360346561,37523658630539536,337712928837117289,3039416363020840000,27354747277647913201,246192725530212278416 %N A238976 a(n) = ((3^(n-1)-1)^2)/4. %C A238976 If the Cantor square fractal is modified as shown in the illustration (see Links), then 4*a(n) is the total number of holes in the modified Cantor square fractal after n iterations. The total number of sides (outside) is 4*A171498(n-1). The total length of the sides (outside) converges to 20 when the initial total side length is 12 (starting with 5 unit squares). %C A238976 For the Cantor square fractal, the total number of sides (outside) is 4*A168616(n+2). The total number of holes is 4*A060867(n-1) for n > 1. The total length of the sides (outside) converges to 12 with the same initial condition (i.e., 5 unit square); its maximum is 17.333... and is reached at n = 2, 3. The Cantor square fractal and modified one are not true fractals. %C A238976 See illustrations in links. %H A238976 Kival Ngaokrajang, <a href="/A238976/a238976_2.pdf">Illustrations of initial terms</a> %H A238976 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CantorSquareFractal.html">Cantor Square Fractal</a> %H A238976 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (13,-39,27) %F A238976 a(n) = (A024023(n-1))^2/4. %F A238976 G.f.: x*(3*x + 1)/((1-x)*(1-3*x)*(1-9*x)). - _Ralf Stephan_, Mar 14 2014 %o A238976 (Small Basic) %o A238976 For n = 1 To 30 %o A238976 a = Math.Power(Math.Power(3,n-1)-1,2) %o A238976 TextWindow.Write(a/4+", ") %o A238976 EndFor %o A238976 (PARI) a(n) = ((3^(n-1)-1)^2)/4; \\ _Joerg Arndt_, Mar 08 2014 %Y A238976 Cf. A024023, A060867, A060868, A168616, A171498. %K A238976 nonn,easy %O A238976 1,3 %A A238976 _Kival Ngaokrajang_, Mar 07 2014