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 A051902 #18 Feb 25 2025 04:04:31 %S A051902 5,13,61,421,4621,150151,8678671,106696591,2454021571,71166625531, %T A051902 401120980261,170676977100631,2129751844690471,562558737261811291, %U A051902 11682905869181336791,97767475431570134191,9613801750771063195351,234576762718813941966541,55008250857561869391153631 %N A051902 Minimal primorial safe primes: p and primorial*p + 1 are both primes. %C A051902 In A051888, 13 of the first 25 values are distinct, while here all corresponding min-primorial-safe-primes are different: {2,5,17,11,23,43,19,3,7,61,53,41,47}. %H A051902 Amiram Eldar, <a href="/A051902/b051902.txt">Table of n, a(n) for n = 1..349</a> %F A051902 a(n) = 1 + A002110(n)*A051887(n). %e A051902 The first five terms of A051887 are 2, so the first 5 terms have the form 1 + 2*A002110(n): 5, 13, 61, 421, 4621, which are smallest terms in A005385, A051644, A051646, A051648, A051649. The 6th term here is A051651(1) = A051887(6)*A002110(6) + 1 = 5*30030 + 1. %t A051902 a[n_] := Module[{p = 2, r =Times @@ Prime[Range[n]]}, While[!PrimeQ[p * r + 1], p = NextPrime[p]]; p * r + 1]; Array[a, 20] (* _Amiram Eldar_, Feb 25 2025 *) %o A051902 (PARI) a(n) = {my(p = 2, r = vecprod(primes(n))); while(!isprime(p * r + 1), p = nextprime(p+1)); p * r + 1;} \\ _Amiram Eldar_, Feb 25 2025 %Y A051902 Cf. A005385, A002110, A051644, A051646, A051648, A051649. %K A051902 nonn %O A051902 1,1 %A A051902 _Labos Elemer_, Dec 16 1999