The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088016 To obtain a(n+1), add the square of the n-th partial sum to the n-th partial sum of the squares, then divide this result by a(n), for all n >= 0, with a(0)=1. 2

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

%S 1,1,6,17,56,179,576,1851,5950,19125,61474,197597,635140,2041543,

%T 6562172,21092919,67799386,217928905,700493182,2251609065,7237391472,

%U 23263290299,74775653304,240352858739,772570939222,2483290023101

%N To obtain a(n+1), add the square of the n-th partial sum to the n-th partial sum of the squares, then divide this result by a(n), for all n >= 0, with a(0)=1.

%H Harvey P. Dale, <a href="/A088016/b088016.txt">Table of n, a(n) for n = 0..1000</a>

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

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

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

%F G.f.: A(x) = A030186(x) * (1-x+x^2), where A030186(x) = gf of A030186.

%e G.f.: A(x) = 1 + x + 6*x^2 + 17*x^3 + 56*x^4 + 179*x^5 + 576*x^6 + ...

%e where A(x) * (1 - 3*x - x^2 + x^3) = 1 - 2*x + 2*x^2 - x^3.

%e Illustration of the initial terms: set a(0) = a(1) = 1, then

%e a(2) = ((1+1)^2 + (1^2 + 1^2))/1 = 6;

%e a(3) = ((1+1+6)^2 + (1^2 + 1^2 + 6^2))/6 = 17;

%e a(4) = ((1+1+6+17)^2 + (1^2 + 1^2 + 6^2 + 17^2))/17 = 56;

%e a(5) = ((1+1+6+17+56)^2 + (1^2 + 1^2 + 6^2 + 17^2 + 56^2))/56 = 179; ...

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

%t LinearRecurrence[{3,1,-1},{1,1,6,17},40] (* _Harvey P. Dale_, Nov 06 2012 *)

%o (PARI) a(n)=(sum(k=0,n-1,a(k))^2+sum(k=0,n-1,a(k)^2))/a(n-1)

%o (PARI) my(x='x+O('x^40)); Vec((1-2*x+2*x^2-x^3)/(1-3*x-x^2+x^3)) \\ _G. C. Greubel_, Oct 27 2019

%o (Magma) I:=[1,6,17]; [1] cat [n le 3 select I[n] else 3*Self(n-1) +Self(n-2) -Self(n-3): n in [1..30]]; // _G. C. Greubel_, Oct 27 2019

%o (Sage)

%o def A088016_list(prec):

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

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

%o A088016_list(40) # _G. C. Greubel_, Oct 27 2019

%o (GAP) a:=[1,6,17];; for n in [4..40] do a[n]:=3*a[n-1]+a[n-2]-a[n-3]; od; Concatenation([1], a); # _G. C. Greubel_, Oct 27 2019

%Y Cf. A030186, A087640.

%K nonn

%O 0,3

%A _Paul D. Hanna_, Sep 18 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 21:06 EDT 2024. Contains 372522 sequences. (Running on oeis4.)