login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) equals the square of the n-th partial sum added to twice the n-th partial sum of the squares, divided by a(n-1), for all n>1, with a(0)=1, a(1)=3.
3

%I #32 Sep 08 2022 08:45:11

%S 1,3,12,47,185,728,2865,11275,44372,174623,687217,2704496,10643361,

%T 41886227,164840412,648718287,2552986921,10047107272,39539710801,

%U 155605856283,612376317860,2409965560639,9484256386273,37324649227232

%N a(n) equals the square of the n-th partial sum added to twice the n-th partial sum of the squares, divided by a(n-1), for all n>1, with a(0)=1, a(1)=3.

%H Vincenzo Librandi, <a href="/A088132/b088132.txt">Table of n, a(n) for n = 0..200</a>

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

%F a(n) = 4*a(n-1) - a(n-3) for n>3.

%F G.f.: (1-x)/(1-4*x+x^3).

%F G.f.: 1/(x - x^2*Sum_{n>=0} A030186(n)*x^n) - 1/x.

%p seq(coeff(series((1-x)/(1-4*x+x^3), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 26 2019

%t LinearRecurrence[{4,0,-1}, {1,3,12}, 30] (* or *) CoefficientList[Series[ (1-x)/(1-4x+x^3), {x,0,30}], x] (* _Harvey P. Dale_, Jun 24 2011 *)

%o (PARI) {a(n)=if(n==0,1, if(n==1,3, (sum(k=0, n-1, a(k))^2 + 2*sum(k=0, n-1, a(k)^2))/a(n-1)))}

%o for(n=0,20,print1(a(n),", ")) \\ _Paul D. Hanna_, Feb 20 2014

%o (PARI) Vec( (1-x)/(1-4*x+x^3) + O(x^66) ) \\ _Joerg Arndt_, Feb 16 2014

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-4*x+x^3) )); // _G. C. Greubel_, Oct 26 2019

%o (Sage)

%o def A088132_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o return P((1-x)/(1-4*x+x^3)).list()

%o A088132_list(30) # _G. C. Greubel_, Oct 26 2019

%o (GAP) a:=[1,3,12];; for n in [4..30] do a[n]:=34a[n-1]-a[n-3]; od; a; # _G. C. Greubel_, Oct 26 2019

%Y Cf. A030186, A088131.

%K nonn,easy

%O 0,2

%A _Paul D. Hanna_, Sep 19 2003