OFFSET
0,3
COMMENTS
Let A be the Hessenberg n X n matrix defined by A[1,j]=j mod 9, A[i,i]:=1, A[i,i-1]=-1. Then, for n >= 1, a(n)=det(A). - Milan Janjic, Jan 24 2010
LINKS
Shawn A. Broyles, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,1,-1).
FORMULA
MAPLE
seq(coeff(series(x*(1-9*x^8+8*x^9)/((1-x^9)*(1-x)^3), x, n+1), x, n), n = 0 .. 70); # G. C. Greubel, Aug 31 2019
MATHEMATICA
Accumulate[PadRight[{}, 120, Range[0, 8]]] (* Harvey P. Dale, Dec 19 2018 *)
Accumulate[Mod[Range[0, 100], 9]] (* Harvey P. Dale, Oct 16 2021 *)
PROG
(PARI) a(n) = sum(k=0, n, k % 9); \\ Michel Marcus, Apr 28 2018
(Magma) I:=[0, 1, 3, 6, 10, 15, 21, 28, 36, 36]; [n le 10 select I[n] else Self(n-1) + Self(n-9) - Self(n-10): n in [1..71]]; // G. C. Greubel, Aug 31 2019
(Sage)
def A130487_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P(x*(1-9*x^8+8*x^9)/((1-x^9)*(1-x)^3)).list()
A130487_list(70) # G. C. Greubel, Aug 31 2019
(GAP) a:=[0, 1, 3, 6, 10, 15, 21, 28, 36, 36];; for n in [11..71] do a[n]:=a[n-1]+a[n-9]-a[n-10]; od; a; # G. C. Greubel, Aug 31 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, May 31 2007
STATUS
approved