cp's OEIS Frontend

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.

A323202 Expansion of (1 - x) * (1 - x^3) / (1 - x^4) in powers of x.

This page as a plain text file.
%I A323202 #20 Aug 04 2025 07:41:14
%S A323202 1,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,
%T A323202 -1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,
%U A323202 0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0,-1,2,-1,0
%N A323202 Expansion of (1 - x) * (1 - x^3) / (1 - x^4) in powers of x.
%H A323202 Michael Somos, <a href="https://cis.csuohio.edu/~somos/rfmc.txt">Rational Function Multiplicative Coefficients</a>.
%H A323202 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1).
%F A323202 a(n) = -b(n) and b() is multiplicative with b(2) = 0, b(2^e) = -2 if e>1, b(p^e) = 1 if p>2.
%F A323202 Euler transform of length 4 sequence [-1, 0, -1, 1].
%F A323202 Moebius transform is length 4 sequence [-1, 1, 0, 2].
%F A323202 G.f.: (1 - x) * (1 - x^3) / (1 - x^4) = -1 + 1 / (1 + x) + 1 / (1 + x^2).
%F A323202 a(n) = a(-n) for all n in Z. a(n+2) = a(n-2) except if n=2 or n=-2.
%F A323202 a(n) = (-1)^n * A098178(n), a(2*n + 1) = -1, a(4*n + 2) = 0 for all n in Z.
%F A323202 E.g.f.: cos(x) + exp(-x) - 1. - _Stefano Spezia_, Aug 04 2025
%e A323202 G.f. = 1 - x - x^3 + 2*x^4 - x^5 - x^7 + 2*x^8 - x^9 - x^11 + ...
%t A323202 a[ n_] := (-1)^n + If[Mod[n, 2] == 0, (-1)^(n/2), 0] - Boole[n == 0];
%t A323202 a[ n_] := {-1, 0, -1, 2}[[Mod[n, 4, 1]]] - Boole[n == 0];
%t A323202 a[ n_] := SeriesCoefficient[ (1 - x) (1 - x^3) / (1 - x^4), {x, 0, Abs@n}];
%t A323202 LinearRecurrence[{-1,-1,-1},{1,-1,0,-1},80] (* _Harvey P. Dale_, May 31 2021 *)
%o A323202 (PARI) {a(n) = (-1)^n + if(n%2==0, (-1)^(n/2)) - (n==0)};
%o A323202 (PARI) {a(n) = [2, -1, 0, -1][n%4 + 1] - (n==0)};
%o A323202 (PARI) {a(n) = n = abs(n); polcoeff( (1 - x) * (1 - x^3) / (1 - x^4) + x * O(x^n), n)};
%o A323202 (PARI) {a(n) = my(e); n=abs(n); if( n<1, n==0, e=valuation(n, 2); -if( e<2, 1-e, -2))};
%Y A323202 Cf. A098178.
%K A323202 sign,easy
%O A323202 0,5
%A A323202 _Michael Somos_, Jan 06 2019