login
A118005
a(n) = ((-1)^n*5^(n+1) + 9^(n+1))/14.
1
1, 4, 61, 424, 4441, 36844, 347221, 3046864, 27812401, 248358484, 2244991981, 20156099704, 181649037961, 1633620638524, 14708689262341, 132347685782944, 1191281759937121, 10720772899980964, 96490770797094301, 868397863687520584, 7815676140619325881, 70340608428415729804, 633067860041532583861, 5697598819444838176624
OFFSET
0,2
COMMENTS
Number of black cells after n iterations of Haferman's carpet.
LINKS
Eric Weisstein's World of Mathematics, Haferman Carpet
FORMULA
From Colin Barker, Jun 08 2013: (Start)
a(n) = 4*a(n-1) + 45*a(n-2).
G.f.: 1 / ((1+5*x)*(1-9*x)). (End)
E.g.f.: (1/14)*(5*exp(-5*x) + 9*exp(9*x)). - G. C. Greubel, Nov 12 2024
MATHEMATICA
LinearRecurrence[{4, 45}, {1, 4}, 41] (* G. C. Greubel, Nov 12 2024 *)
PROG
(PARI) Vec(1 / ((1 + 5*x)*(1 - 9*x)) + O(x^40)) \\ Colin Barker, Feb 26 2020
(Magma) [n le 2 select 4^(n-1) else 4*Self(n-1) +45*Self(n-2): n in [1..41]]; // G. C. Greubel, Nov 12 2024
(Python)
def A118005(n): return (9^(n+1) +(-1)^n*5^(n+1))//14
print([A118005(n) for n in range(41)]) # G. C. Greubel, Nov 12 2024
CROSSREFS
Sequence in context: A158300 A129452 A131014 * A132064 A229666 A252973
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Apr 09 2006
STATUS
approved