%I #18 Nov 19 2023 21:16:19
%S 0,1,1,0,-2,-1,0,1,0,0,-1,-1,0,1,1,0,0,-1,0,1,2,0,-1,-1,0,1,1,0,-2,-1,
%T 0,1,0,0,-1,-1,0,1,1,0,0,-1,0,1,2,0,-1,-1,0,1,1,0,-2,-1,0,1,0,0,-1,-1,
%U 0,1,1,0,0,-1,0,1,2,0,-1,-1,0,1,1,0,-2,-1,0
%N Period 24 sequence [0, 1, 1, 0, -2, -1, 0, 1, 0, 0, -1, -1, 0, 1, 1, 0, 0, -1, 0, 1, 2, 0, -1, -1].
%H Michael Somos, <a href="http://grail.eecs.csuohio.edu/~somos/rfmc.html">Rational function multiplicative coefficients</a>.
%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,0,1,-1,1,0,-1,1,-1).
%F Euler transform of length 24 sequence [1, -1, -2, 1, -1, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1].
%F a(n) is multiplicative with a(2) = 1, a(4) = -2, a(2^e) = 0 if e > 2, a(3^e) = 0^e, a(p^e) = 1, if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6).
%F a(n) = -a(-n) = a(n+24), a(n) + a(n+12) = 2 * A128834(n) for all n in Z.
%F a(2*n + 1) = a(4*n + 2) = a(8*n + 1) = a(8*n + 7) = A057078(n). a(3*n) = a(8*n) = 0. a(4*n + 1) = a(8*n + 2) = -a(8*n + 5) = A049347(n-1). a(6*n + 1) = -a(6*n + 5) = 1. a(6*n + 2) = A007877(n-1).
%F G.f.: f(x) - f(x^4) where f(x) := x / (1 - x + x^2).
%F G.f.: x * (1 - x^3) * (1 - x^5) / ((1 - x + x^2) * (1 - x^4 + x^8)).
%e G.f. = x + x^2 - 2*x^4 - x^5 + x^7 - x^10 - x^11 + x^13 + x^14 - x^17 + ...
%t a[ n_] := (-1)^Quotient[ n, 3] Sign[Mod[n, 3]] - If[ Mod[n, 4] > 0, 0, (-1)^Quotient[ n, 12] Sign[Mod[n, 12]]];
%o (PARI) {a(n) = (-1)^(n\3) * (n%3>0) - if( n%4, 0, (-1)^(n\12) * (n%12>0))};
%o (PARI) {a(n) = my(m = abs(n)); sign(n) * polcoeff( x * (1 - x^3) * (1 - x^5) / ((1 - x + x^2) * (1 - x^4 + x^8)) + x * O(x^m), m)};
%Y Cf. A049347, A057078.
%K sign,easy,mult
%O 0,5
%A _Michael Somos_, May 13 2015