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 A258087 #51 Sep 08 2022 08:46:12 %S A258087 0,0,1,3,6,9,14,18,25,30,39,45,56,63,76,84,99,108,125,135,154,165,186, %T A258087 198,221,234,259,273,300,315,344,360,391,408,441,459,494,513,550,570, %U A258087 609,630,671,693,736,759,804,828,875,900,949,975,1026,1053,1106,1134 %N A258087 Start with all terms set to 0. Then add n to the next n+2 terms for n=0,1,2,... . %H A258087 Reinhard Zumkeller, <a href="/A258087/b258087.txt">Table of n, a(n) for n = 0..10000</a> %H A258087 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1). %F A258087 a(n) = (6*n^2+2*n-11+(2*n-5)*(-1)^n)/16+0^n. %F A258087 a(n) = Sum_{i=1..n-1} (3*i+2)/4+(2-i)*(-1)^i/4. %F A258087 From _Robert Israel_, May 19 2015: (Start) %F A258087 G.f.: x^2*(x^3-x^2-2*x-1)/((x+1)^2*(x-1)^3). %F A258087 E.g.f.: 1 + exp(x)*(6*x^2+8*x-11)/16 - exp(-x)*(2*x+5)/16. %F A258087 a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n >= 6. (End) %F A258087 From _Bruno Berselli_, May 20 2015: (Start) %F A258087 a(n) = a(-n) for n odd, a(n) = a(-n)+n/2 otherwise. %F A258087 a(n) = (floor(n/2)+1)*(floor(n/2)+2*floor((n-1)/2))/2 for n>0. Therefore, after 3, all terms of the sequence are composite. (End) %F A258087 a(n) = Sum_{i=floor((n-1)/2)..n-1} i, for n>0. - _Wesley Ivan Hurt_, Apr 11 2016 %e A258087 n | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, ... %e A258087 __________________________________________ %e A258087 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... %e A258087 + 0, 0 %e A258087 + 1, 1, 1 %e A258087 + 2, 2, 2, 2 %e A258087 + 3, 3, 3, 3, 3 %e A258087 + 4, 4, 4, 4, 4, 4 %e A258087 + 5, 5, 5, 5, 5, 5, 5 %e A258087 + 6, 6, 6, 6, 6, 6, 6, 6 %e A258087 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 %e A258087 + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 %e A258087 + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 %e A258087 + ... %e A258087 __________________________________________ %e A258087 a(n)|0, 0, 1, 3, 6, 9,14,18,25,30,39, ... %p A258087 A258087:=n->(6*n^2+2*n-11+(2*n-5)*(-1)^n)/16+0^n: seq(A258087(n), n=0..100); %t A258087 Join[{0}, Table[(6 n^2 + 2 n - 11 + (2 n - 5) (-1)^n)/16, {n, 100}]] %t A258087 Table[Total@ Range[Floor[(n - 1)/2], n - 1], {n, 55}] (* _Michael De Vlieger_, Apr 11 2016 *) %o A258087 (Magma) [(6*n^2+2*n-11+(2*n-5)*(-1)^n)/16+0^n: n in [0..60]]; // _Vincenzo Librandi_, May 20 2015 %o A258087 (Sage) [(6*n^2+2*n-11+(2*n-5)*(-1)^n)/16+0^n for n in (0..60)] # _Bruno Berselli_, May 20 2015 %o A258087 (Haskell) %o A258087 a258087 n = a258087_list !! n %o A258087 a258087_list = f 0 [0] $ %o A258087 map (\i -> take (i + 1) (repeat 0) ++ replicate (i + 2) i) [0..] where %o A258087 f i ys@(y:_) (xs:xss) = (ys !! i) : %o A258087 f (i + 1) (zipWith (+) (ys ++ repeat 0) xs) xss %o A258087 -- _Reinhard Zumkeller_, May 21 2015 %o A258087 (PARI) a(n) = if (n==0, 0, sum(k = (n-1)\2, n-1, k)); \\ _Michel Marcus_, Apr 11 2016 %o A258087 (PARI) x='x+O('x^99); concat([0, 0], Vec(x^2*(x^3-x^2-2*x-1)/((x+1)^2*(x-1)^3))) \\ _Altug Alkan_, Apr 11 2016 %Y A258087 Cf. A272058. %K A258087 nonn,easy %O A258087 0,4 %A A258087 _Wesley Ivan Hurt_, May 19 2015