OFFSET
1,9
LINKS
Robert Price, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,1,1,1,1,1,1).
FORMULA
a(n)=1 for 1 <= n <= 8, a(n) = a(n-1) + a(n-2) +...+ a(n-8) for n > 8.
G.f.: x*(1 -x^2 -2*x^3 -3*x^4 -4*x^5 -5*x^6 -6*x^7)/(1 -x -x^2 -x^3 -x^4 -x^5 -x^6 -x^7 -x^8). - Colin Barker, Oct 19 2015
MAPLE
m:=50; S:=series( x*(1-x^2-2*x^3-3*x^4-4*x^5-5*x^6-6*x^7)/(1-x-x^2-x^3-x^4-x^5-x^6-x^7-x^8), x, m+1):
seq(coeff(S, x, j), j=1..m); # G. C. Greubel, Mar 10 2021
MATHEMATICA
Module[{nn=8, lr}, lr=PadRight[{}, nn, 1]; LinearRecurrence[lr, lr, 20]] (* Harvey P. Dale, Feb 04 2015 *)
PROG
(PARI) Vec(x*(1-x^2-2*x^3-3*x^4-4*x^5-5*x^6-6*x^7)/(1-x-x^2-x^3-x^4-x^5-x^6-x^7-x^8) + O(x^50)) \\ Colin Barker, Oct 19 2015
(Sage)
@CachedFunction
def A123526(n):
if (n<9): return 1
else: return sum(A(n-j) for j in (1..8))
[A123526(n) for n in [1..50]] # G. C. Greubel, Mar 10 2021
(Magma)
R<x>:=PowerSeriesRing(Integers(), 50);
Coefficients(R!( x*(1-x^2-2*x^3-3*x^4-4*x^5-5*x^6-6*x^7)/(1-x-x^2-x^3-x^4-x^5-x^6-x^7-x^8) )); // G. C. Greubel, Mar 10 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Danny Rorabaugh, Nov 10 2006
STATUS
approved