OFFSET
0,3
COMMENTS
Let A be the Hessenberg n X n matrix defined by A[1,j] = j mod 7, 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,1,-1).
FORMULA
MAPLE
a:=n->add(chrem( [n, j], [1, 7] ), j=1..n):seq(a(n), n=1..70); # Zerinvary Lajos, Apr 07 2009
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 1, 3, 6, 10, 15, 21, 21}, 70] (* Harvey P. Dale, Jul 30 2017 *)
PROG
(PARI) concat(0, Vec((1-7*x^6+6*x^7)/(1-x^7)/(1-x)^3+O(x^70))) \\ Charles R Greathouse IV, Dec 22 2011
(Magma) I:=[0, 1, 3, 6, 10, 15, 21, 21]; [n le 8 select I[n] else Self(n-1) + Self(n-7) - Self(n-8): n in [1..71]]; // G. C. Greubel, Aug 31 2019
(Sage)
def A130485_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P(x*(1-7*x^6+6*x^7)/((1-x^7)*(1-x)^3)).list()
A130485_list(70) # G. C. Greubel, Aug 31 2019
(GAP) a:=[0, 1, 3, 6, 10, 15, 21, 21];; for n in [9..71] do a[n]:=a[n-1]+a[n-7]-a[n-8]; od; a; # G. C. Greubel, Aug 31 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, May 31 2007
STATUS
approved