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!)
A235367 Sum of positive even numbers up to n^2. 1
0, 6, 20, 72, 156, 342, 600, 1056, 1640, 2550, 3660, 5256, 7140, 9702, 12656, 16512, 20880, 26406, 32580, 40200, 48620, 58806, 69960, 83232, 97656, 114582, 132860, 154056, 176820, 202950, 230880, 262656, 296480, 334662, 375156, 420552, 468540, 522006, 578360, 640800, 706440, 778806 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Consider a square array of side n in which we write the integers from 1 to n in any order. This sequence gives the sum of the even numbers in the array.
LINKS
FORMULA
a(n) = (n^4 + 2n^2)/4 if n is even, a(n) = (n^4 - 1)/4 if n is odd.
a(n) = ((n^2 - (n^2 mod 2))/4)(n^2 + 2 - (n^2 mod 2)). - Alonso del Arte, Jan 16 2014
a(n) = A110660(n^2). - Michel Marcus, Jan 18 2014
G.f.: -2*x^2*(3*x^4+4*x^3+10*x^2+4*x+3) / ((x-1)^5*(x+1)^3). - Colin Barker, Jan 18 2014
EXAMPLE
a(1) = 0 because there are no even numbers between 1 and itself.
a(2) = 6 because between 1 and 2^2 there are the even numbers 2 and 4, which add up to 6.
a(3) = 20 because between 1 and 3^2 there are the even numbers 2, 4, 6 and 8, which add up to 20.
MATHEMATICA
Table[((n^2 - Mod[n^2, 2])/4)(n^2 + 2 - Mod[n^2, 2]), {n, 40}] (* Alonso del Arte, Jan 16 2014 *)
PROG
(PARI) a(n) = sum(i=1, n, i^2*(!(i % 2))); \\ Michel Marcus, Jan 18 2014
(Magma) [&+[i: i in [0..n^2 by 2]]: n in [1..50]]; // Bruno Berselli, Oct 26 2018
CROSSREFS
Sequence in context: A074353 A075055 A146891 * A189604 A153372 A028402
KEYWORD
nonn,easy
AUTHOR
Réjean Labrie, Jan 07 2014
EXTENSIONS
Corrected by Vincenzo Librandi, Jan 18 2014
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 April 23 11:35 EDT 2024. Contains 371912 sequences. (Running on oeis4.)