login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157130 Partial sums of A128201 1
1, 4, 8, 13, 20, 29, 40, 53, 68, 84, 101, 120, 141, 164, 189, 216, 245, 276, 309, 344, 380, 417, 456, 497, 540, 585, 632, 681, 732, 785, 840, 897, 956, 1017, 1080, 1144, 1209, 1276, 1345, 1416, 1489, 1564, 1641, 1720, 1801, 1884, 1969, 2056, 2145, 2236, 2329 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

FORMULA

a(n) = (n-r)^2+(4*r^3+6*r^2+2*r)/3 where r = floor((-1+floor(sqrt(1+8*n)))/4).

EXAMPLE

For n=3, 1+3+4=8

First three terms of A128201 are 1, 3, 4, hence a(3) = 1+3+4 = 8.

PROG

(MAGMA) [ (n-r)^2+(4*r^3+6*r^2+2*r)/3 where r is Floor((-1+Floor(Sqrt(1+8*n)))/4): n in [1..51] ];

(PARI) {for(n=1, 51, r=floor((-1+floor(sqrt(1+8*n)))/4); print1((n-r)^2+(4*r^3+6*r^2+2*r)/3, ", "))}

CROSSREFS

Cf. A128201 (union of A000290 and A005408), A000290 (squares), A005408 (odd numbers).

Sequence in context: A143978 A071994 A023661 * A172050 A060403 A139097

Adjacent sequences:  A157127 A157128 A157129 * A157131 A157132 A157133

KEYWORD

nonn

AUTHOR

Gerald Hillier (adr.rabbicat(AT)gmail.com), Feb 23 2009

EXTENSIONS

Edited and extended by Klaus Brockhaus, Feb 24 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 03:45 EST 2012. Contains 205978 sequences.