This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A353123 #118 May 13 2022 09:48:46 %S A353123 3,2,31,2309,8191,746129,16546531,300690389,11823922111,239378649509, %T A353123 11003163441269,304250263527209,23293697005168589 %N 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. %C A353123 If a given prime p is less than a(n) then the numbers of distinct prime factors of p+1 and p-1 have a difference less than n. %C A353123 From _Daniel Suteu_, May 11 2022: (Start) %C A353123 a(13) <= 693386350578511591, %C A353123 a(14) <= 42296567385289206991, %C A353123 a(15) <= 3291505006196194517729, %C A353123 a(16) <= 222099275340153625904489, %C A353123 a(17) <= 12592092354842984193179971, %C A353123 a(18) <= 873339227295479848905071071, %C A353123 a(19) <= 54536351988824964540662450069, %C A353123 a(20) <= 5513390541916364286137713664909. (End) %C A353123 From _Jon E. Schoenfield_, May 11 2022: (Start) %C A353123 For n > 1, if there exists any prime p < 2*prime(n+2)# such that the absolute difference of the numbers of distinct prime factors of p+1 and p-1 is exactly n, then (since a(n) <= p) it follows that a(n)+1 and a(n)-1, in some order, are either (1) a power of 2, and 2 times an odd number with n distinct prime factors, or (2) an odd prime times a power of 2, and the product of n+2 distinct primes. (In the first case, the numbers of distinct prime factors are 1 and n+1; in the second, they are 2 and n+2.) %C A353123 E.g., for n = 6, given that p = 18888871 is a prime < 19399380 = 2*(2*3*5*7*11*13*17*19) and the prime factorizations of p+1 and p-1 are 2^3 * 2361109 and 2*3*5*7*11*13*17*37, then a(6)+1 must be too small to have more than 8 distinct prime factors, and also too small to have exactly 8 distinct prime factors with any factor having a multiplicity greater than 1. Thus, a(6) is the smallest prime p such that p+1 and p-1, in some order, are either (1) a power of 2, and 2 times an odd number with 6 distinct prime factors, or (2) a prime times a power of 2, and the product of 8 distinct primes. (As it turns out, a(6) = 16546531, so a(6) + 1 = 2^2 * 4136633 (2 distinct prime factors) and a(6) - 1 = 2*3*5*7*11*13*19*29 (8 distinct prime factors).) %C A353123 For each n in 2..100, there exists such a prime p < 2*prime(n+2)#, so the numbers of distinct prime factors of a(n)+1 and a(n)-1 are, in some order, 1 and n+1 or 2 and n+2. %C A353123 For n <= 100, the maximum value of a(n)/prime(n+2)# is a(16)/prime(18)# = 1.893617.... %C A353123 (End) %e A353123 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. %o A353123 (PARI) isok(p, n) = abs(omega(p-1)-omega(p+1)) == n; %o A353123 a(n) = my(p=2); while (!isok(p,n), p=nextprime(p+1)); p; \\ _Michel Marcus_, May 09 2022 %Y A353123 Cf. A067386. %K A353123 nonn,more %O A353123 0,1 %A A353123 _Yusuf Gurtas_, May 08 2022 %E A353123 a(7)-a(8) from _Amiram Eldar_, May 08 2022 %E A353123 a(9)-a(10) from _Yusuf Gurtas_, May 08 2022 %E A353123 a(11) from _Yusuf Gurtas_, May 09 2022 %E A353123 a(9) corrected by _Yusuf Gurtas_, May 09 2022 %E A353123 a(12) from _Yusuf Gurtas_, May 09 2022