OFFSET
0,3
COMMENTS
a(n) + a(n+3) = 21, 21, 69, 69, 153, 153, ...
Hexagonal spiral for A026741:
.
33--17--35--18
/
16 8--17---9--19
/ / \
31 15 5---3---7 10
/ / / \ \
15 7 2 0===1===4==21==>
\ \ \ / / /
29 13 3---1 9 11
\ \ / /
14 6--11---5 23
\ /
27--13--25--12
.
a(n) is the horizontal sequence from 0.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
a(n) = n * A165355(n-1).
From Colin Barker, Nov 13 2019: (Start)
G.f.: x*(1 + 4*x + 18*x^2 + 8*x^3 + 5*x^4) / ((1 - x)^3*(1 + x)^3).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n > 5.
a(n) = (1/4)*(-1)*((-3 + (-1)^n)*n*(-2+3*n)).
(End)
MATHEMATICA
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 1, 4, 21, 20, 65}, 100] (* Paolo Xausa, Nov 13 2023 *)
PROG
(PARI) concat(0, Vec(x*(1 + 4*x + 18*x^2 + 8*x^3 + 5*x^4) / ((1 - x)^3*(1 + x)^3) + O(x^45))) \\ Colin Barker, Nov 13 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 13 2019
STATUS
approved