login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A360927
Expansion of the g.f. x*(1 + 3*x + 4*x^2 + 4*x^3)/((1 - x)^2*(1 + x)).
0
0, 1, 4, 9, 16, 21, 28, 33, 40, 45, 52, 57, 64, 69, 76, 81, 88, 93, 100, 105, 112, 117, 124, 129, 136, 141, 148, 153, 160, 165, 172, 177, 184, 189, 196, 201, 208, 213, 220, 225, 232, 237, 244, 249, 256, 261, 268, 273, 280, 285, 292, 297, 304, 309, 316, 321, 328
OFFSET
0,3
COMMENTS
The sequence gives the number of "ON" cells in the cellular automaton on a quadrant of a square grid after the n-th stage, where the "ON" cells lie only on the perimeter and the two diagonals of the square.
FORMULA
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 4.
a(0) = 0, a(1) = 1, a(n) = 6*n - 8 for n even, and a(n) = 6*n - 9 for n odd.
E.g.f.: 4*(x + 2) + (6*x - 8)*cosh(x) + (6*x - 9)*sinh(x).
a(2*n) = A017569(n-1) = 4*A016777(n-1).
a(2*n+1) = A017629(n-1).
EXAMPLE
Illustrations for n = 1..8:
o o o o o o
o o o o o
o o o
a(1) = 1 a(2) = 4 a(3) = 9
o o o o o o o o o o o o o o o
o o o o o o o o o o o o
o o o o o o o o o o o
o o o o o o o o o o o o
o o o o o o o o o
o o o o o o
a(4) = 16 a(5) = 21 a(6) = 28
o o o o o o o o o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o o o o o
o o o o o o o o
a(7) = 33 a(8) = 40
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {0, 1, 4, 9, 16}, 57]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Feb 25 2023
STATUS
approved