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 A257181 #12 Sep 08 2022 08:46:12 %S A257181 1,-1,0,0,1,-2,1,0,0,-1,2,-1,0,0,1,-2,1,0,0,-1,2,-1,0,0,1,-2,1,0,0,-1, %T A257181 2,-1,0,0,1,-2,1,0,0,-1,2,-1,0,0,1,-2,1,0,0,-1,2,-1,0,0,1,-2,1,0,0,-1, %U A257181 2,-1,0,0,1,-2,1,0,0,-1,2,-1,0,0,1,-2,1,0,0 %N A257181 Expansion of (1 - x) * (1 + x^4) / (1 + x^5) in powers of x. %H A257181 G. C. Greubel, <a href="/A257181/b257181.txt">Table of n, a(n) for n = 0..2500</a> %H A257181 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,-1). %F A257181 Euler transform of length 10 sequence [-1, 0, 0, 1, -1, 0, 0, -1, 0, 1]. %F A257181 a(n) = a(-n) for all n in Z. a(n+5) = -a(n) unless n = 0 or -5. a(5*n) = 2 * (-1)^n unless n = 0. a(5*n + 2) = a(5*n + 3) = 0. a(5*n + 1) = a(5*n - 1) = -(-1)^n. %F A257181 G.f.: (1 - x) * (1 + x^4) / (1 + x^5). %F A257181 G.f.: (1 - x) * (1 - x^5) * (1 - x^8) / ((1 - x^4) * (1 - x^10)). %F A257181 Convolution inverse is A257179. %F A257181 a(n) = (-1)^floor( (n+4) / 5) * A164116(n). %e A257181 G.f. = 1 - x + x^4 - 2*x^5 + x^6 - x^9 + 2*x^10 - x^11 + x^14 - 2*x^15 + ... %t A257181 a[ n_] := -Boole[n == 0] + {-1, 0, 0, 1, -2, 1, 0, 0, -1, 2}[[Mod[n, 10, 1]]]; %t A257181 a[ n_] := SeriesCoefficient[ (1 - x) * (1 + x^4) / (1 + x^5), {x, 0, Abs@n}]; %t A257181 CoefficientList[Series[(1-x)*(1+x^4)/(1+x^5), {x, 0, nmax}], x] (* _G. C. Greubel_, Aug 02 2018 *) %o A257181 (PARI) {a(n) = if( n==0, 1, (-1)^(n\5) * [2, -1, 0, 0, 1][n%5 + 1])}; %o A257181 (PARI) {a(n) = polcoeff( (1 - x) * (1 + x^4) / (1 + x^5) + x * O(x^abs(n)), abs(n))}; %o A257181 (PARI) x='x+O('x^60); Vec((1-x)*(1+x^4)/(1+x^5)) \\ _G. C. Greubel_, Aug 02 2018 %o A257181 (Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x)*(1+x^4)/(1+x^5))); // _G. C. Greubel_, Aug 02 2018 %Y A257181 Cf. A164116, A257179. %K A257181 sign,easy %O A257181 0,6 %A A257181 _Michael Somos_, Apr 17 2015