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 A128615 #16 Mar 26 2024 04:09:43 %S A128615 0,1,-1,0,2,-2,0,3,-3,0,4,-4,0,5,-5,0,6,-6,0,7,-7,0,8,-8,0,9,-9,0,10, %T A128615 -10,0,11,-11,0,12,-12,0,13,-13,0,14,-14,0,15,-15,0,16,-16,0,17,-17,0, %U A128615 18,-18,0,19,-19 %N A128615 Expansion of x/(1 + x + x^2 - x^3 - x^4 - x^5). %C A128615 Partial sums are 0,1,0,0,2,0,0,3,0,0,4,... %H A128615 G. C. Greubel, <a href="/A128615/b128615.txt">Table of n, a(n) for n = 0..1000</a> %H A128615 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,1,1,1). %F A128615 G.f.: x/((1-x)*(1+x+x^2)^2) = x*(1-x)/(1-x^3)^2. %F A128615 a(n) = (1/9)*(1 - cos(2*Pi*n/3) + sqrt(3)*(2*n + 3)*sin(2*Pi*n/3)). %F A128615 a(n) = floor((n+3)/3)*A049347(n+2). - _G. C. Greubel_, Mar 26 2024 %t A128615 CoefficientList[Series[x/(1+x+x^2-x^3-x^4-x^5),{x,0,60}],x] (* or *) LinearRecurrence[{-1,-1,1,1,1},{0,1,-1,0,2},60] (* or *) Table[{0,n,-n},{n,20}]//Flatten (* _Harvey P. Dale_, Jul 15 2017 *) %t A128615 Table[Floor[(n+3)/3]*(Mod[n+1,3] -1), {n,0,40}] (* _G. C. Greubel_, Mar 26 2024 *) %o A128615 (Magma) [Floor((n+3)/3)*((n+1) mod 3 -1): n in [0..40]]; // _G. C. Greubel_, Mar 26 2024 %o A128615 (SageMath) [((n+3)//3)*((n+1)%3 -1) for n in range(41)] # _G. C. Greubel_, Mar 26 2024 %Y A128615 Cf. A049347, A087508. %K A128615 easy,sign %O A128615 0,5 %A A128615 _Paul Barry_, Mar 13 2007