[go: up one dir, main page]

login
A352848
a(n) is the first prime p such that, with q the next prime, p + q^2 is 10^n times a prime.
2
2, 409, 25819, 101119, 3796711, 4160119, 264073519, 2310648079, 165231073519, 9671986711, 18300671986711, 154590671986711, 2237199609971479, 2735490671986711, 193086838131073519, 1529978199609971479, 3288779373987568759
OFFSET
0,1
COMMENTS
From Daniel Suteu, Dec 28 2022: (Start)
For n >= 1, a(n) has the form k * 10^n + x, for some k >= 0, where x is a solution to the modular quadratic equation x^2 + (2*d + 1)*x + d^2 == 0 (mod 10^n), where d = q-p.
a(17) <= 73421283931459964959, a(18) <= 3895482305490671986711. (End)
EXAMPLE
a(2) = 25819 because 25819 is prime, the next prime is 25841, 25819 + 25841^2 = 667783100 = 6677831*10^2 and 6677831 is prime.
MAPLE
V:= Array(0..5):
count:= 0:
q:= 2:
while count < 6 do
p:= q; q:= nextprime(p);
v:= p+q^2;
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);
MATHEMATICA
seq[len_] := Module[{p = 2, q, s = Table[0, {len}], c = 0, r, e}, While[c < len, q = NextPrime[p]; r = p + q^2; e = IntegerExponent[r, 10] + 1; If[e <= len && s[[e]] == 0 && PrimeQ[r/10^(e - 1)], c++; s[[e]] = p]; p = q]; s]; seq[6] (* Amiram Eldar, Apr 07 2022 *)
PROG
(PARI)
isok(n, p, q) = my(v=valuation(p+q^2, 10)); (v == n) && isprime((p+q^2)/10^v);
a(n) = my(p=2); forprime(q=p+1, oo, if(isok(n, p, q), return(p)); p=q); \\ Daniel Suteu, Apr 08 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Apr 05 2022
EXTENSIONS
a(6)-a(9) from Amiram Eldar, Apr 07 2022
a(10)-a(16) from Daniel Suteu, Dec 28 2022
STATUS
approved