OFFSET
1,1
LINKS
MATHEMATICA
Select[10*Range[0, 10^7] + 5, CompositeQ[#] && Divisible[# - 1, CarmichaelLambda[#]] &] (* Amiram Eldar, Jul 07 2022 *)
PROG
(PARI) Korselt(n) = my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); 1;
isok(n) = ((n%10)==5) && !isprime(n) && Korselt(n) && n>1; \\ Michel Marcus, Jul 07 2022; after A002997
(Python)
from itertools import islice
from sympy import factorint, nextprime
def A355305_gen(): # generator of terms
p, q = 3, 5
while True:
for n in range(p+2+(-p+3)%10, q, 10):
f = factorint(n)
if max(f.values()) == 1 and not any((n-1) % (p-1) for p in f):
yield n
p, q = q, nextprime(q)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Omar E. Pol, Jul 03 2022
STATUS
approved