A353123 a(n) is the first prime p for which the absolute value of the difference between the numbers of distinct prime factors of p+1 and p-1 is exactly n.
3, 2, 31, 2309, 8191, 746129, 16546531, 300690389, 11823922111, 239378649509, 11003163441269, 304250263527209, 23293697005168589
Offset: 0
Examples
a(2) = 31 because the number of distinct prime factors of 32 is 1 and the number of distinct prime factors of 30 is 3, giving a difference of 2. No prime less than 31 has this property.
Crossrefs
Cf. A067386.
Programs
-
PARI
isok(p, n) = abs(omega(p-1)-omega(p+1)) == n; a(n) = my(p=2); while (!isok(p,n), p=nextprime(p+1)); p; \\ Michel Marcus, May 09 2022
Extensions
a(7)-a(8) from Amiram Eldar, May 08 2022
a(9)-a(10) from Yusuf Gurtas, May 08 2022
a(11) from Yusuf Gurtas, May 09 2022
a(9) corrected by Yusuf Gurtas, May 09 2022
a(12) from Yusuf Gurtas, May 09 2022
Comments