%I #22 Jan 01 2023 02:29:28
%S 0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,
%T 0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,
%U 1,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,0
%N Period 8 sequence [ 0, 1, 0, 1, 1, 1, 0, 1, ...].
%H Michael Somos, <a href="http://grail.eecs.csuohio.edu/~somos/rfmc.html">Rational Function Multiplicative Coefficient</a>.
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,1).
%F Euler transform of length 8 sequence [0, 1, 1, 0, -1, -1, 0, 1].
%F Moebius transform is length 8 sequence [1, -1, 0, 1, 0, 0, 0, -1].
%F a(n) is multiplicative with a(2) = 0, a(4) = 1, a(2^e) = 0 if e>2, a(p^e) = 1 if p>2.
%F G.f.: x * (1 - x^5) * (1 + x^3) / ((1 - x^2) * (1 - x^8)).
%F G.f.: x * (1 - x^5) * (1 - x^6) / ((1 - x^2) * (1 - x^3) * (1 - x^8)).
%F G.f.: f(x) + f(x^4) where f(x) := x / (1 - x^2).
%F a(n) = a(-n) = a(n+8) for all n in Z.
%F a(n) = -(-1)^n * A280237(n). a(2*n + 1) = 1. a(4*n + 2) = 0.
%F G.f.: -x*(x^2-x+1)*(x^4+x^3+x^2+x+1) / ( (x-1)*(1+x)*(x^2+1)*(x^4+1) ). - _R. J. Mathar_, Jun 18 2015
%F Dirichlet g.f.: zeta(s)*(1-1/2^s+1/4^s-1/8^s). - _Amiram Eldar_, Jan 01 2023
%e G.f. = x + x^3 + x^4 + x^5 + x^7 + x^9 + x^11 + x^12 + x^13 + x^15 + ...
%t a[ n_] := Mod[n, 2] + Boole[Mod[n, 8] == 4];
%t a[ n_] := {1, 0, 1, 1, 1, 0, 1, 0}[[Mod[n, 8, 1]]];
%t a[ n_] := SeriesCoefficient[ x / (1 - x^2) + x^4 / (1 - x^8), {x, 0, Abs@n}];
%t PadRight[{},120,{0,1,0,1,1,1,0,1}] (* _Harvey P. Dale_, Feb 22 2018 *)
%o (PARI) {a(n) = (n%2) + (n%8==4)};
%o (PARI) {a(n) = [0, 1, 0, 1, 1, 1, 0, 1][n%8 + 1]};
%o (PARI) {a(n) = polcoeff( x / (1 - x^2) + x^4 / (1 - x^8) + x * O(x^abs(n)), abs(n))};
%Y Cf. A280237.
%K nonn,mult,easy
%O 0,1
%A _Michael Somos_, Jun 17 2015
|