This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A244953 #51 Oct 29 2023 12:50:39 %S A244953 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, %T A244953 39,41,42,42,45,47,48,48,51,53,54,54,57,59,60,60,63,65,66,66,69,71,72, %U A244953 72,75,77,78,78,81,83,84,84,87,89,90,90,93,95,96,96,99 %N A244953 a(n) = Sum_{i=0..n} (-i mod 4). %C A244953 Partial sums of A158459. %C A244953 Similar to A047271 with every third term repeated. %H A244953 Vincenzo Librandi, <a href="/A244953/b244953.txt">Table of n, a(n) for n = 0..5000</a> %H A244953 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %F A244953 a(n) = Sum_{i=0..n} A158459(i). %F A244953 From _Bruno Berselli_, Jul 09 2014: (Start) %F A244953 G.f.: (3 + 2*x + x^2)/((1 + x)*(1 - x)^2*(1 + x^2)). %F A244953 a(n) = 1 + n + ( 2*(1 + n) - (1 + (-1)^n)*(1 + 2*i^(n*(n+1))) )/4, where i = sqrt(-1). %F A244953 a(n) = 6 + Sum_{i=1..3}((4-i)*floor((n-i)/4)). (End) %F A244953 a(n) = a(n-1) + a(n-4) - a(n-5). - _Robert Israel_, Jul 09 2014 %F A244953 a(n) = (3*n + 4 - (n mod 4 - 2)^2)/2. - _Thomas Klemm_, Aug 21 2022 %e A244953 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. %p A244953 A244953:=n->add(-i mod 4, i=0..n): seq(A244953(n), n=0..50); %t A244953 Table[Sum[Mod[-i, 4], {i, 0, n}], {n, 0, 50}] %t A244953 Table[1 + n + (2 (1 + n) - (1 + (-1)^n) (1 + 2 I^(n (n + 1))))/4, {n, 0, 70}] (* _Bruno Berselli_, Jul 09 2014 *) %t A244953 LinearRecurrence[{1,0,0,1,-1},{0,3,5,6,6},70] (* _Harvey P. Dale_, Oct 29 2023 *) %o A244953 (PARI) a(n) = sum(i=0, n, -i % 4); \\ _Michel Marcus_, Jul 09 2014 %o A244953 (Magma) [&+[-i mod 4: i in [0..n]]: n in [0..70]]; // _Bruno Berselli_, Jul 09 2014 %Y A244953 Cf. A158459. Same members as A047271. Similar to A130482. %K A244953 nonn,easy %O A244953 0,2 %A A244953 _Wesley Ivan Hurt_, Jul 08 2014