A352803 a(n) is the first prime p such that, with q the next prime, p^2+q is 10^n times a prime.
2, 523, 2243, 39419, 763031, 37427413, 594527413, 5440486343, 1619625353, 35960850223, 17012632873031, 43502632873031, 2322601810486343, 5470654702304929, 99466287423954043, 1917321601810486343, 6091565756519625353
Offset: 0
Examples
a(2) = 2243 because 2243 is prime, the next prime is 2251, 2243^2+2251 = 5033300 = 10^2*50333 and 50333 is prime.
Programs
-
Maple
V:= Array(0..5): count:= 0: q:= 2: while count < 6 do p:= q; q:= nextprime(p); v:= p^2+q; r:= padic:-ordp(v, 2); if r <= 5 and V[r] = 0 and padic:-ordp(v, 5) = r and isprime(v/10^r) then V[r]:= p; count:= count+1; fi; od: convert(V, list);
-
PARI
isok(n,p,q) = my(v=valuation(p^2+q, 10)); (v == n) && isprime((p^2+q)/10^v); a(n) = my(p=2); forprime(q=p+1, oo, if(isok(n,p,q), return(p)); p=q); \\ Daniel Suteu, Apr 07 2022
Extensions
a(6)-a(9) from Daniel Suteu, Apr 07 2022
a(10)-a(16) from Daniel Suteu, Dec 28 2022
Comments