login
A358656
Least prime p such that p^n + 2 is the product of n distinct primes.
2
3, 2, 7, 71, 241, 83, 157, 6947, 4231, 35509, 15541, 199499, 649147
OFFSET
1,1
COMMENTS
Corresponding values of p^n + 2 are 5, 6, 345, 25411683, 812990017203, 326940373371, 2351243277537495, ...
EXAMPLE
a(1) = 3; 3^1 + 2 = 5.
a(2) = 2; 2^2 + 2 = 2 * 3.
a(3) = 7; 7^3 + 2 = 3 * 5 * 23.
a(4) = 71; 71^4 + 2 = 3 * 11 * 19 * 40529.
MATHEMATICA
Table[b=2; 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}]
PROG
(PARI) a(n) = forprime(p=2, , my(f=factor(p^n + 2)); if (issquarefree(f) && (omega(f) == n), return(p))); \\ Michel Marcus, Nov 29 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(13) from Daniel Suteu, Dec 09 2022
STATUS
approved