OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,0,0,1,1,2,3,2,1,2,1,2,1,2,3,2,1,1,0,0,-1,-1).
FORMULA
G.f.: (-2*x^24 - 2*x^23 + 3*x^22 + 6*x^21 + 9*x^20 + 12*x^19 + 15*x^18 + 18*x^17 + 21*x^16 + 25*x^15 + 27*x^14 + 27*x^13 + 27*x^12 + 27*x^11 + 27*x^10 + 27*x^9 + 23*x^8 + 21*x^7 + 19*x^6 + 16*x^5 + 13*x^4 + 10*x^3 + 7*x^2 + 4*x + 1)/(x^22 + x^21 - x^18 - x^17 - 2*x^16 - 3*x^15 - 2*x^14 - x^13 - 2*x^12 - x^11 - 2*x^10 - x^9 - 2*x^8 - 3*x^7 - 2*x^6 - x^5 - x^4 + x + 1).
a(n) = -a(n-1) + a(n-4) + a(n-5) + 2*a(n-6) + 3*a(n-7) + 2*a(n-8) + a(n-9) + 2*a(n-10) + a(n-11) + 2*a(n-12) + a(n-13) + 2*a(n-14) + 3*a(n-15) + 2*a(n-16) + a(n-17) + a(n-18) - a(n-21) - a(n-22) for n>24. - Colin Barker, Feb 06 2018
PROG
(Magma) See Magma program in A298805.
(PARI) Vec((1 + 4*x + 7*x^2 + 10*x^3 + 13*x^4 + 16*x^5 + 19*x^6 + 21*x^7 + 23*x^8 + 27*x^9 + 27*x^10 + 27*x^11 + 27*x^12 + 27*x^13 + 27*x^14 + 25*x^15 + 21*x^16 + 18*x^17 + 15*x^18 + 12*x^19 + 9*x^20 + 6*x^21 + 3*x^22 - 2*x^23 - 2*x^24) / ((1 - x + x^2)*(1 + x + x^2)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)*(1 - 2*x^2 + x^6 - 2*x^10 + x^12)) + O(x^60)) \\ Colin Barker, Feb 06 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Cannon and N. J. A. Sloane, Feb 06 2018
STATUS
approved