OFFSET
1,6
COMMENTS
a(n) = -1 for each nonsquarefree n > 4 with n = Product_{j=1..w} p_j ^ e_j because there exist infinitely many multiples of n that have exactly n divisors. Included among such multiples are all numbers of the form c*q^(b-1) where b is the smallest prime factor of n, q is any prime that does not divide n, and c = Product_{j=1..w} p_j ^ (d_j - 1), with the d_j values chosen so that Product_{j=1..w} d_j = n/b and d_j > e_j for j = 1..w.
FORMULA
EXAMPLE
a(1) = 1 because there is only 1 number that has exactly 1 divisor (namely, 1).
For every prime p, a(p) = 1 because the only multiple of p that has exactly p divisors is p^(p-1).
a(4) = 1 because the only multiple of 4 that has exactly 4 divisors is 8. (4 itself has only 3 divisors, and 4*k for every k > 2 has more than 4 divisors.)
If n is squarefree, then a(n) = w! where w is the number of prime factors of n, because every multiple of n that has exactly n divisors must be of the form p_1^e_1 * p_2^e_2 * ... * p_w^e_w where p_1, p_2, ..., p_w are the prime factors of n and the vector (e_1 + 1, e_2 + 1, ..., e_w + 1) is one of the w! permutations of the vector (p_1, p_2, ..., p_w).
If n > 4 is nonsquarefree then a(n) = -1 because there exist infinitely many multiples of n that have exactly n divisors. Examples (where p and q are distinct odd primes and e > 1):
n = 2^q: 2^(2^(q-1) - 1) * p has 2^q divisors for every p
n = q^e: q^(q^(e-1) - 1) * p^(q-1) has q^e divisors for every p
n = 4*q: 2^(q-1)*q*p has 4*q divisors for every p.
MATHEMATICA
a[n_]:=If[n==4, 1, If[SquareFreeQ[n], PrimeNu[n]!, -1]]; Array[a, 78] (* Stefano Spezia, Oct 28 2023 *)
CROSSREFS
KEYWORD
sign
AUTHOR
Jon E. Schoenfield, Oct 28 2023
STATUS
approved