OFFSET
1,8
COMMENTS
A196787, A000126, and A000124 are all specific series of this general formula of series. When no=2 the series is A196787. When no=0 the series is A000124 with an additional '1' at the beginning. When no=1 the series is A000126 with an additional '1' at the beginning.
The data given above is the series with no=6 and n=25, having a(1)=.....a(no+1)=1 initially.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,0,0,0,0,0,-1,1).
FORMULA
a(n)=1 if n<=7, else a(n) = n-no-2+sum_{i=1..no+1} a(n-i), no=6.
G.f.: x*( -1+2*x-6*x^7+4*x^8 ) / ( (x^7+x^6+x^5+x^4+x^3+x^2+x-1)*(x-1)^2 ). - R. J. Mathar, Oct 21 2011
EXAMPLE
For n=25, no=6, then a(1)=1, a(2)=1, ......, a(no)=1 and a(7)=a(1)+a(2)+....a(no)+(6-no), a(8)=a(2)+...a(no+1)+(7-no), a(n)=a(n-no)+....a(n-1)+((n-1)-no) and so a(25)=a(19)+....a(24)+(24-6).
MAPLE
A196876 := proc(n)
option remember;
if n <= 7 then
1;
else
n-6-2+add(procname(n-i), i=1..7) ;
end if;
end proc: # R. J. Mathar, Oct 21 2011
MATHEMATICA
CoefficientList[Series[(- 1 + 2 x - 6 x^7 + 4 x^8)/((x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x - 1) (x - 1)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 11 2012 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Aditya Subramanian, Oct 07 2011
STATUS
approved