OFFSET
0,2
COMMENTS
This sequence and the sequence counting the non-corner vertices (A359453) alternate as to which is larger.
LINKS
Allan Bickle, Degrees of Menger and Sierpinski Graphs, Congr. Num. 227 (2016) 197-208.
Allan Bickle, MegaMenger Graphs, The College Mathematics Journal, 49 1 (2018) 20-26.
Eric Weisstein's World of Mathematics, Menger Sponge
Wikipedia, Menger sponge
Index entries for linear recurrences with constant coefficients, signature (16,80).
FORMULA
a(n) = (20^n + (-4)^n)/2.
a(n) = 20^n - A359453(n).
From Stefano Spezia, Jan 02 2023: (Start)
O.g.f.: (1 - 8*x)/((1 - 20*x)*(1 + 4*x)).
E.g.f.: exp(8*x)*cosh(12*x). (End)
EXAMPLE
The level 1 Menger sponge graph can be formed by subdividing every edge of a cube graph. This produces a graph with 8 corner vertices and 12 non-corner vertices, so a(1) = 8.
MATHEMATICA
PROG
(PARI) a(n) = (20^n + (-4)^n)/2 \\ Andrew Howroyd, Jan 02 2023
(Python)
def A359452(n): return (10**n<<n-1)+(-(1<<(n<<1)-1) if n&1 else 1<<(n<<1)-1) if n else 1 # Chai Wah Wu, Feb 13 2023
KEYWORD
nonn,easy
AUTHOR
Allan Bickle, Jan 02 2023
STATUS
approved