cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A112524 a(n) = a(n-1) + 2*n^2 with a(1) = 1.

This page as a plain text file.
%I A112524 #24 Feb 16 2025 08:32:59
%S A112524 1,9,27,59,109,181,279,407,569,769,1011,1299,1637,2029,2479,2991,3569,
%T A112524 4217,4939,5739,6621,7589,8647,9799,11049,12401,13859,15427,17109,
%U A112524 18909,20831,22879,25057,27369,29819,32411,35149,38037,41079,44279,47641
%N A112524 a(n) = a(n-1) + 2*n^2 with a(1) = 1.
%C A112524 This is the total number of operations or total storage if a process first replaces a square array by an array one smaller, repeatedly down to 1 and then regrows the array to the original size.
%H A112524 Harvey P. Dale, <a href="/A112524/b112524.txt">Table of n, a(n) for n = 1..1000</a>
%H A112524 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Condensation.html">Condensation</a>
%H A112524 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F A112524 Twice the sum of the first n square numbers - 1 = n*(n + 1)*(2n + 1)/3 - 1. - _Stefan Steinerberger_, Mar 11 2006
%F A112524 From _R. J. Mathar_, Sep 09 2008: (Start)
%F A112524 G.f.: x*(1 +5*x -3*x^2 +x^3)/(1-x)^4.
%F A112524 a(n) = A006331(n) - 1. (End)
%F A112524 a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), a(1)=1, a(2)=9, a(3)=27, a(4)=59. - _Harvey P. Dale_, Dec 03 2012
%F A112524 E.g.f.: ( 3 + (-3 + 6*x + 9*x^2 + 2*x^3)*exp(x) )/3. - _G. C. Greubel_, Jan 12 2022
%p A112524 a[1]:=1: for n from 2 to 50 do a[n]:=a[n-1]+2*n^2 od: seq(a[n],n=1..50); # _Emeric Deutsch_, Feb 13 2006
%p A112524 a:=n->sum(k^2, k=1..n):seq(a(n)+sum(k^2, k=2..n), n=1...40); # _Zerinvary Lajos_, Jun 11 2008
%t A112524 Table[n*(n+1)*(2n+1)/3 - 1, {n, 50}] (* _Stefan Steinerberger_, Mar 11 2006 *)
%t A112524 2*Accumulate[Range[50]^2]-1 (* or *) LinearRecurrence[{4,-6,4,-1},{1,9,27,59},50] (* _Harvey P. Dale_, Dec 03 2012 *)
%o A112524 (Sage) [n*(n+1)*(2*n+1)/3 - 1 for n in (1..40)] # _G. C. Greubel_, Jan 12 2022
%o A112524 (Magma) [n*(n+1)*(2*n+1)/3 - 1: n in [1..40]]; // _G. C. Greubel_, Jan 12 2022
%Y A112524 Cf. A006331.
%K A112524 easy,nonn
%O A112524 1,2
%A A112524 Dennis Farr (dfarr(AT)comcast.net), Dec 13 2005
%E A112524 Definition corrected by _Alexandre Wajnberg_, Jan 02 2006
%E A112524 More terms from _Emeric Deutsch_, Feb 13 2006
%E A112524 More terms from _Stefan Steinerberger_, Mar 11 2006