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!)
A319007 Sum of the next n nonnegative integers repeated (A004526). 2
0, 1, 5, 14, 29, 51, 82, 124, 178, 245, 327, 426, 543, 679, 836, 1016, 1220, 1449, 1705, 1990, 2305, 2651, 3030, 3444, 3894, 4381, 4907, 5474, 6083, 6735, 7432, 8176, 8968, 9809, 10701, 11646, 12645, 13699, 14810, 15980, 17210, 18501, 19855, 21274, 22759, 24311, 25932 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
After 29, all terms are composite.
LINKS
FORMULA
G.f.: x^2*(1 + x + x^2)/((1 + x^2)*(1 - x)^4).
a(n) = -a(-n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6).
a(n) = (2*n*(n^2 - 2) + (1 - (-1)^n)*(-1)^((n-1)/2))/8.
a(n) = A319006(n) - n.
a(n) = (n^3 - 2*n + Chi(n))/4 where Chi(n) = A101455(n). - Peter Luschny, Sep 09 2018
EXAMPLE
Next n nonnegative integers repeated: Sums:
0, ...................................... 0
0, 1, ................................... 1
1, 2, 2, ................................ 5
3, 3, 4, 4, ............................. 14
5, 5, 6, 6, 7, .......................... 29
7, 8, 8, 9, 9, 10, ...................... 51, etc.
MAPLE
a := n -> (n^3 - 2*n + (-(n mod 2))^binomial(n, 2))/4;
seq(a(n), n=1..47); # Peter Luschny, Sep 09 2018
MATHEMATICA
Table[(2 n (n^2 - 2) + (1 - (-1)^n) (-1)^((n-1)/2))/8, {n, 1, 50}]
PROG
(Magma) [Integers()! (n*(n^2-2)+(-(n mod 2))^(n*(n-1)/2))/4: n in [1..50]];
(PARI) concat(0, Vec(x^2*(1 + x + x^2)/((1 + x^2)*(1 - x)^4) + O(x^50))) \\ Colin Barker, Sep 10 2018
CROSSREFS
Sum of the next n nonnegative integers: A027480.
Sequence in context: A005918 A321178 A256666 * A211651 A299291 A019262
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Sep 07 2018
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 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)