OFFSET
1,1
COMMENTS
The sequence seems to be very similar to A324455 but there are terms present here, which are absent there and vice versa. Also, the k satisfying the property for a given n, even when it exists, is different for both.
The sequence is infinite as A016825 (4m+2, m > 0) is a subsequence with the corresponding k = 2m + 1.
Another subsequence is A002997 (Carmichael numbers).
LINKS
Arjun Maneesh Agarwal, Table of n, a(n) for n = 1..10000
EXAMPLE
6 is a term as 3^3 = 27 = 3 mod 6.
10 is a term as 5^5 = 3125 = 5 mod 10.
PROG
(Haskell) divisors n = [x | x <- [2..n], n `mod` x == 0]
property n = any (\x -> x^x `mod` n == x) $ divisors n
inRange t = [x | x <- [2..t], property x]
(PARI) isok(m) = fordiv(m, k, if((k>1) && (k<m) && (Mod(k, m)^k == k), return(1))); \\ Michel Marcus, Jul 16 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Arjun Maneesh Agarwal, Jul 15 2025
STATUS
approved
