login
A053981
A fourth order generalization of the Mobius function of n.
6
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,1
REFERENCES
Compares the exponents of the factors of the canonical prime factorization of n with 4 as detailed in A053864.
LINKS
MATHEMATICA
a[n_] := Which[ee = FactorInteger[n][[All, 2]]; AnyTrue[ee, # > 4 &], 0, AnyTrue[ee, # < 4 &], 1, True, (-1)^Length[ee]]; Array[a, 100] (* Jean-François Alcover, Feb 09 2018 *)
PROG
(PARI) a(n) = if(n == 1, 1, my(e = factor(n)[, 2]); if(vecmax(e) > 4, 0, if(vecmin(e) < 4, 1, (-1)^#e))); \\ Amiram Eldar, Oct 01 2024
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Apr 08 2000
STATUS
approved