OFFSET
0,3
COMMENTS
Let A be the Hessenberg n X n matrix defined by A[1,j] = j mod 6, 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,1,-1).
FORMULA
MAPLE
seq(coeff(series(x*(1-6*x^5+5*x^6)/((1-x^6)*(1-x)^3), x, n+1), x, n), n = 0 .. 70); # G. C. Greubel, Aug 31 2019
MATHEMATICA
Accumulate[Mod[Range[0, 70], 6]] (* or *) Accumulate[PadRight[ {}, 70, Range[0, 5]]] (* Harvey P. Dale, Jul 12 2016 *)
PROG
(PARI) a(n) = sum(k=0, n, k % 6); \\ Michel Marcus, Apr 28 2018
(PARI) a(n)=n\6*15 + binomial(n%6+1, 2) \\ Charles R Greathouse IV, Jan 24 2022
(Magma) I:=[0, 1, 3, 6, 10, 15, 15]; [n le 7 select I[n] else Self(n-1) + Self(n-6) - Self(n-7): n in [1..71]]; // G. C. Greubel, Aug 31 2019
(Sage)
def A130484_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P(x*(1-6*x^5+5*x^6)/((1-x^6)*(1-x)^3)).list()
A130484_list(70) # G. C. Greubel, Aug 31 2019
(GAP) a:=[0, 1, 3, 6, 10, 15, 15];; for n in [8..71] do a[n]:=a[n-1]+a[n-6]-a[n-7]; od; a; # G. C. Greubel, Aug 31 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, May 31 2007
STATUS
approved