login
a(n) = a(n-no-1)+....+a(n-1)+(n-no-2) where no is the 'no+1'th order of the series and 'n' is the element number, here no=6.
1

%I #43 Nov 13 2025 14:41:23

%S 1,1,1,1,1,1,1,7,14,28,56,112,224,448,896,1786,3559,7091,14127,28143,

%T 56063,111679,222463,443141,882724,1758358,3502590,6977038,13898014,

%U 27684350,55146238,109849336,218815949,435873541,868244493,1729511949,3445125885

%N a(n) = a(n-no-1)+....+a(n-1)+(n-no-2) where no is the 'no+1'th order of the series and 'n' is the element number, here no=6.

%C 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.

%C The data given above is the series with no=6 and n=25, having a(1)=.....a(no+1)=1 initially.

%H Vincenzo Librandi, <a href="/A196876/b196876.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,0,0,0,0,0,-1,1).

%F a(n)=1 if n<=7, else a(n) = n-no-2+sum_{i=1..no+1} a(n-i), no=6.

%F 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

%e 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).

%p A196876 := proc(n)

%p option remember;

%p if n <= 7 then

%p 1;

%p else

%p n-6-2+add(procname(n-i),i=1..7) ;

%p end if;

%p end proc: # _R. J. Mathar_, Oct 21 2011

%t 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 *)

%t LinearRecurrence[{3,-2,0,0,0,0,0,-1,1},{1,1,1,1,1,1,1,7,14},40] (* _Harvey P. Dale_, Nov 13 2025 *)

%K nonn,easy

%O 1,8

%A _Aditya Subramanian_, Oct 07 2011