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!)
A112524 a(n) = a(n-1) + 2*n^2 with a(1) = 1. 2
1, 9, 27, 59, 109, 181, 279, 407, 569, 769, 1011, 1299, 1637, 2029, 2479, 2991, 3569, 4217, 4939, 5739, 6621, 7589, 8647, 9799, 11049, 12401, 13859, 15427, 17109, 18909, 20831, 22879, 25057, 27369, 29819, 32411, 35149, 38037, 41079, 44279, 47641 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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.
LINKS
Eric Weisstein's World of Mathematics, Condensation
FORMULA
Twice the sum of the first n square numbers - 1 = n*(n + 1)*(2n + 1)/3 - 1. - Stefan Steinerberger, Mar 11 2006
From R. J. Mathar, Sep 09 2008: (Start)
G.f.: x*(1 +5*x -3*x^2 +x^3)/(1-x)^4.
a(n) = A006331(n) - 1. (End)
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
E.g.f.: ( 3 + (-3 + 6*x + 9*x^2 + 2*x^3)*exp(x) )/3. - G. C. Greubel, Jan 12 2022
MAPLE
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
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
MATHEMATICA
Table[n*(n+1)*(2n+1)/3 - 1, {n, 50}] (* Stefan Steinerberger, Mar 11 2006 *)
2*Accumulate[Range[50]^2]-1 (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 9, 27, 59}, 50] (* Harvey P. Dale, Dec 03 2012 *)
PROG
(Sage) [n*(n+1)*(2*n+1)/3 - 1 for n in (1..40)] # G. C. Greubel, Jan 12 2022
(Magma) [n*(n+1)*(2*n+1)/3 - 1: n in [1..40]]; // G. C. Greubel, Jan 12 2022
CROSSREFS
Cf. A006331.
Sequence in context: A051412 A027468 A158926 * A254622 A340119 A271990
KEYWORD
easy,nonn
AUTHOR
Dennis Farr (dfarr(AT)comcast.net), Dec 13 2005
EXTENSIONS
Definition corrected by Alexandre Wajnberg, Jan 02 2006
More terms from Emeric Deutsch, Feb 13 2006
More terms from Stefan Steinerberger, Mar 11 2006
STATUS
approved

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 March 19 03:27 EDT 2024. Contains 370952 sequences. (Running on oeis4.)