OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Jia Huang, Partially Palindromic Compositions, J. Int. Seq. (2023) Vol. 26, Art. 23.4.1. See pp. 4, 17.
Index entries for linear recurrences with constant coefficients, signature (6,-14,14,0,-14,14,-6,1).
FORMULA
From Paul Barry, Jul 01 2003: (Start)
a(n) = Sum_{k=0..n} (-1)^(n-k)*C(k+6, 6).
a(n) = (4*n^6 +96*n^5 +910*n^4 +4320*n^3 +10696*n^2 +12864*n+5715)/5760+(-1)^n/128. (End)
Boas-Buck recurrence: a(n) = (1/n)*Sum_{p=0..n-1} (7 + (-1)^(n-p))*a(p), n >= 1, a(0) = 1. See the Boas-Buck comment in A046521 (here for the unsigned column k = 3 with offset 0).
a(n)+a(n+1) = A000579(n+7). - R. J. Mathar, Jan 06 2021
MATHEMATICA
CoefficientList[Series[1/((1+x)(1-x)^7), {x, 0, 30}], x] (* or *) LinearRecurrence[ {6, -14, 14, 0, -14, 14, -6, 1}, {1, 6, 22, 62, 148, 314, 610, 1106}, 40] (* Harvey P. Dale, May 24 2015 *)
PROG
(Magma) [(4*n^6+96*n^5+910*n^4+4320*n^3+10696*n^2+12864*n+5715)/5760+(-1)^n/128: n in [0..40]]; // Vincenzo Librandi, Aug 15 2011
(PARI) a(n)=(4*n^6+96*n^5+910*n^4+4320*n^3+10696*n^2+12864*n)\/5760+1 \\ Charles R Greathouse IV, Apr 17 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved