A358979 Least prime p such that p^n + 4 is the product of n distinct primes.
3, 19, 11, 29, 131, 631, 983, 353, 9941, 20089, 15031, 8387, 102931
Offset: 1
Examples
a(1) = 3; 3^1 + 4 = 7. a(2) = 19; 19^2 + 4 = 5 * 73. a(3) = 11; 11^3 + 4 = 3 * 5 * 89. a(4) = 29; 29^4 + 4 = 5 * 17 * 53 * 157.
Programs
-
Mathematica
Table[b=4;y[a_]:=FactorInteger[Prime[a]^n+b];k=1;Monitor[Parallelize[While[True,If[And[Length[y[k]]==n,Count[Flatten[y[k]],1]==n],Break[]];k++];k],k]//Prime,{n,1,10}]
-
PARI
a(n) = forprime(p=2, , my(f=factor(p^n + 4)); if (issquarefree(f) && (omega(f) == n), return(p)));
Comments