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 A257170 #18 Oct 02 2023 14:06:58 %S A257170 1,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0, %T A257170 -1,0,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,-1,0,1,0,1,0, %U A257170 -1,0,-1,0,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,-1 %N A257170 Expansion of (1 + x) * (1 + x^3) / (1 + x^4) in powers of x. %H A257170 G. C. Greubel, <a href="/A257170/b257170.txt">Table of n, a(n) for n = 0..2500</a> %H A257170 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, -1). %F A257170 Euler transform of length 8 sequence [1, -1, 1, -1, 0, -1, 0, 1]. %F A257170 a(n) is multiplicative with a(2^e) = 0^e, a(p^e) = 1 if p == 1 or 3 (mod 8), a(p^e) = (-1)^e otherwise and a(0) = 1. %F A257170 a(n) = -a(-n) for all n in Z unless n = 0. a(n+4) = -a(n) unless n = 0 or n = -4. a(2*n) = 0 unless n = 0. %F A257170 a(n) = A188510(n) unless n = 0. %F A257170 a(n+1) - a(n) = (-1)^n if n>0. %F A257170 G.f.: (1 + x) * (1 + x^3) / (1 + x^4) = 1 + (x + x^3) / (1 + x^4). %F A257170 G.f.: (1 - x^2) * (1 - x^4) * (1 - x^6) / ((1 - x) * (1 - x^3) * (1 - x^8)). %F A257170 G.f.: 1 / (1 - x / (1 + x / (1 + x / (1 - x / (1 + 2*x / (1 - 2*x / (1 - x / (2 + x)))))))). %e A257170 G.f. = 1 + x + x^3 - x^5 - x^7 + x^9 + x^11 - x^13 - x^15 + x^17 + x^19 + ... %t A257170 a[ n_] := If[ EvenQ[ n], Boole[n == 0], (-1)^Quotient[ n, 4]]; %t A257170 a[ n_] := If[ n == 0, 1, Sign[ n] SeriesCoefficient[ (1 + x) * (1 + x^3) / (1 + x^4), {x, 0, Abs @ n}]]; %t A257170 CoefficientList[Series[(1+x)*(1+x^3)/(1+x^4), {x, 0, 60}], x] (* _G. C. Greubel_, Aug 02 2018 *) %o A257170 (PARI) {a(n) = if( n%2 == 0, n==0, (-1)^(n\4))}; %o A257170 (PARI) {a(n) = if( n==0, 1, sign(n) * polcoeff( (1 + x) * (1 + x^3) / (1 + x^4), + x* O(x^abs(n)), abs(n)))}; %o A257170 (PARI) x='x+O('x^60); Vec((1+x)*(1+x^3)/(1+x^4)) \\ _G. C. Greubel_, Aug 02 2018 %o A257170 (Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x)*(1+x^3)/(1+x^4))); // _G. C. Greubel_, Aug 02 2018 %Y A257170 Cf. A188510. %K A257170 sign,mult,easy %O A257170 0,1 %A A257170 _Michael Somos_, Apr 17 2015