OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (3,3,3,3,3,3,3,3,3,3,3,-6).
FORMULA
G.f.: (t^12 + 2*t^11 + 2*t^10 + 2*t^9 + 2*t^8 + 2*t^7 + 2*t^6 + 2*t^5 + 2*t^4 + 2*t^3 + 2*t^2 + 2*t + 1)/(6*t^12 - 3*t^11 - 3*t^10 - 3*t^9 - 3*t^8 - 3*t^7 - 3*t^6 - 3*t^5 - 3*t^4 - 3*t^3 - 3*t^2 - 3*t + 1).
From G. C. Greubel, Aug 02 2024: (Start)
a(n) = 3*Sum_{j=1..11} a(n-j) - 6*a(n-12).
G.f.: (1+x)*(1-x^12)/(1 - 4*x + 9*x^12 - 6*x^13). (End)
MATHEMATICA
CoefficientList[Series[(1+t)*(1-t^12)/(1-4*t+9*t^12-6*t^13), {t, 0, 50}], t] (* G. C. Greubel, May 15 2016; Aug 02 2024 *)
coxG[{12, 6, -3, 30}] (* The coxG program is at A169452 *) (* Harvey P. Dale, Feb 19 2018 *)
PROG
(Magma)
R<x>:=PowerSeriesRing(Integers(), 30);
f:= func< p, q, x | (1+x)*(1-x^12)/(1-(q+1)*x+(p+q)*x^12-p*x^13) >;
Coefficients(R!( f(6, 3, x) )); // G. C. Greubel, Aug 02 2024
(SageMath)
def f(p, q, x): return (1+x)*(1-x^12)/(1-(q+1)*x+(p+q)*x^12-p*x^13)
def A166495_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( f(6, 3, x) ).list()
A166495_list(30) # G. C. Greubel, Aug 02 2024
(PARI) Vec((1+x^4+x^8)*(1+x^2)*(1+x)^2/(1-3*x-3*x^2-3*x^3-3*x^4-3*x^5-3*x^6-3*x^7-3*x^8-3*x^9-3*x^10-3*x^11+6*x^12)+O(x^99)) \\ Charles R Greathouse IV, Jun 08 2026
(PARI) a(n)=if(n, ([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1; -6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]^(n-1)*[5; 20; 80; 320; 1280; 5120; 20480; 81920; 327680; 1310720; 5242880; 20971510])[1, 1], 1) \\ Charles R Greathouse IV, Jun 08 2026
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
John Cannon and N. J. A. Sloane, Dec 03 2009
STATUS
approved
