OFFSET
1,1
COMMENTS
Note that for even k, m == -1 (mod k) is a solution.
All terms are composite.
Odd composite k is a term if and only if v(p-1) > v(k-1) for some prime factors p of k. See A345330 for a proof.
This sequence and the Carmichael numbers (A002997) are disjoint: 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
51 is a term since 51 = 3 * 17 and v(17-1) = 4 > v(51-1) = 1. Also, m^(2^v(51-1)+1) == -m (mod 51) has three solutions: m == 0, 21, 30 (mod 51).
PROG
(PARI) isA345331(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(1))); 0, 0)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Jun 14 2021
STATUS
approved