OFFSET
1,1
FORMULA
EXAMPLE
G.f. = x - x^2 - x^3 + x^6 - x^7 - x^8 + x^9 + x^11 - x^13 + x^14 - x^17 + ...
MATHEMATICA
f[p_, e_] := KroneckerSymbol[5, p]^e; f[2, e_] := -(1 - (-1)^e) / 2; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 04 2023 *)
PROG
(PARI) {a(n) = my(A, p, e); if( !n, 0, A = factor(abs(n)); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, -(e%2), kronecker( 5, p)^e)))};
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Jun 17 2015
STATUS
approved