OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,1,1,1,1,1,1,1,1,1,-1).
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)/(t^12 - t^11 - t^10 - t^9 - t^8 - t^7 - t^6 - t^5 - t^4 - t^3 - t^2 - t + 1).
From G. C. Greubel, Jul 28 2024: (Start)
a(n) = Sum_{j=1..11} a(n-j) - a(n-11).
G.f.: (1+x)*(1-x^12)/(1 - 2*x + 2*x^12 - x^13). (End)
MATHEMATICA
With[{p=1, q=1}, CoefficientList[Series[(1+t)*(1-t^12)/(1-(q+1)*t + (p+ q)*t^12-p*t^13), {t, 0, 40}], t]] (* G. C. Greubel, May 15 2016; Jul 28 2024 *)
coxG[{12, 1, -1, 40}] (* The coxG program is at A169452 *) (* Harvey P. Dale, Jul 15 2020 *)
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(1, 1, x) )); // G. C. Greubel, Jul 28 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 A166467_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( f(1, 1, x) ).list()
A166467_list(30) # G. C. Greubel, Jul 28 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
John Cannon and N. J. A. Sloane, Dec 03 2009
STATUS
approved