OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..950
Index entries for linear recurrences with constant coefficients, signature (1,0,1298,-1298,0,-1,1).
FORMULA
a(n) = 1298*a(n-3) - a(n-6) - 648 for n > 6.
G.f.: x*(1+7*x+137*x^2-938*x^3+137*x^4+7*x^5+x^6) / ((1-x)*(1-11*x+x^2)*(1+11*x+120*x^2+11*x^3+x^4)). - R. J. Mathar, Sep 09 2008
MATHEMATICA
CoefficientList[Series[x (1+7x+137x^2-938x^3+137x^4+7x^5+x^6)/((1-x) (1-11x+x^2)(1+11x+120x^2+11x^3+x^4)), {x, 0, 30}], x] (* or *) LinearRecurrence[{1, 0, 1298, -1298, 0, -1, 1}, {0, 1, 8, 145, 505, 9728, 187561, 654841}, 30] (* Harvey P. Dale, Jun 12 2012 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x*(1+7*x+137*x^2-938*x^3+137*x^4+7*x^5+x^6) / ((1-x)*(1-11*x+x^2)*(1+11*x+120*x^2+11*x^3+x^4)) )); // G. C. Greubel, Mar 14 2023
(SageMath)
@CachedFunction
def a(n): # a = A105046
if (n<8): return (0, 1, 8, 145, 505, 9728, 187561, 654841)[n]
else: return a(n-1) +1298*a(n-3) -1298*a(n-4) -a(n-6) +a(n-7)
[a(n) for n in range(41)] # G. C. Greubel, Mar 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gerald McGarvey, Apr 03 2005
EXTENSIONS
More terms from Harvey P. Dale, Jun 12 2012
STATUS
approved