This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A244953 a(n) = Sum_{i=0..n} (-i mod 4). 1
 0, 3, 5, 6, 6, 9, 11, 12, 12, 15, 17, 18, 18, 21, 23, 24, 24, 27, 29, 30, 30, 33, 35, 36, 36, 39, 41, 42, 42, 45, 47, 48, 48, 51, 53, 54, 54, 57, 59, 60, 60, 63, 65, 66, 66, 69, 71, 72, 72, 75, 77, 78, 78, 81, 83, 84, 84, 87, 89, 90, 90, 93, 95, 96, 96, 99 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS Partial sums of A158459(n). Similar to A047271 with every third term repeated. LINKS Vincenzo Librandi, Table of n, a(n) for n = 0..5000 Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1). FORMULA a(n) = Sum_{i=0..n} A158459(i). From Bruno Berselli, Jul 09 2014: (Start) G.f.: (3 + 2*x + x^2)/((1 + x)*(1 - x)^2*(1 + x^2)). a(n) = 1 + n + ( 2*(1 + n) - (1 + (-1)^n)*(1 + 2*i^(n*(n+1))) )/4, where i = sqrt(-1). a(n) = 6 + Sum_{i=1..3}((4-i)*floor((n-i)/4)). (End) a(n) = a(n-1) + a(n-4) - a(n-5). - Robert Israel, Jul 09 2014 EXAMPLE To quickly generate terms of the sequence: start with zero for n=0, then add 3 more for n=1, then add 2 more for n=2, add 1 more..., then add 0..., and repeat. MAPLE A244953:=n->add(-i mod 4, i=0..n): seq(A244953(n), n=0..50); MATHEMATICA Table[Sum[Mod[-i, 4], {i, 0, n}], {n, 0, 50}] Table[1 + n + (2 (1 + n) - (1 + (-1)^n) (1 + 2 I^(n (n + 1))))/4, {n, 0, 70}] (* Bruno Berselli, Jul 09 2014 *) PROG (PARI) a(n) = sum(i=0, n, -i % 4); \\ Michel Marcus, Jul 09 2014 (MAGMA) [&+[-i mod 4: i in [0..n]]: n in [0..70]]; // Bruno Berselli, Jul 09 2014 CROSSREFS Cf. A158459. Same members as A047271. Similar to A130482. Sequence in context: A267884 A077859 A123572 * A076819 A181757 A181753 Adjacent sequences:  A244950 A244951 A244952 * A244954 A244955 A244956 KEYWORD nonn,easy AUTHOR Wesley Ivan Hurt, Jul 08 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 22 01:06 EDT 2019. Contains 321406 sequences. (Running on oeis4.)