OFFSET
1,1
COMMENTS
For primes p, m^(2^v(p-1)+1) == -m (mod p) has only one solution m == 0 (mod p). This sequence gives that composite numbers that satisfy this condition.
All terms are odd since for even k, m == -1 (mod k) is a solution.
Odd composite k is a term if and only if v(p-1) <= v(k-1) for all prime factors p of k. Proof: Let k = (p_1)^(e_1)*(p_2)^(e_2)*...*(p_r)^(e_r) be an odd number. m^(2^v(k-1)+1) == -m (mod k) has only one solution if and only if m^(2^v(k-1)+1) == -m (mod (p_i)^(e_i)) has only one solution for 1 <= i <= r, or equivalently, m^(2^v(k-1)) == -1 (mod (p_i)^(e_i)) has no solution for 1 <= i <= r, or v(p_i-1) <= v(k-1) for 1 <= i <= r.
All prime powers of the form p^e for odd prime p and e >= 2 are terms. All Carmichael numbers (A002997) are also terms: if k is a Carmichael number, then p-1 | k-1 for all prime factors p.
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
EXAMPLE
225 = 3^2 * 5^2 is a term since v(3-1) = 1 <= v(225-1) = 7, v(5-1) = 2 <= v(225-1) = 7. Also, the equation m^(2^v(225-1)+1) == -m (mod 225) has a unique solution m == 0 (mod 225).
1885 = 5 * 13 * 29 is a term since v(5-1) = v(13-1) = v(29-1) = 2 <= v(1885-1) = 2. Also, the equation m^(2^v(1885-1)+1) == -m (mod 1885) has a unique solution m == 0 (mod 1885).
PROG
(PARI) isA345330(n) = if(!isprime(n) && n>1 && n%2, my(f=factor(n), w=omega(n)); for(i=1, w, if(valuation(f[i, 1]-1, 2) > valuation(n-1, 2), return(0))); 1, 0)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Jun 14 2021
EXTENSIONS
Name revised by Michael B. Porter, Feb 22 2023
STATUS
approved