login
A308816
Primes r such that there exist primes p, q with p^2 - 2*q^2 = r.
1
7, 17, 23, 31, 41, 47, 71, 103, 113, 151, 167, 191, 239, 263, 271, 281, 311, 353, 359, 383, 431, 479, 503, 521, 599, 647, 719, 743, 823, 839, 863, 887, 911, 953, 983, 1031, 1103, 1151, 1223, 1319, 1361, 1367, 1439, 1487, 1511, 1559, 1583, 1607, 1663, 1823, 1831, 1847, 1871, 2039, 2063, 2087, 2111
OFFSET
1,1
COMMENTS
If q is not 2 or 3, then r == 23 (mod 24).
The generalized Dickson conjecture implies that for any prime q there are infinitely many p for which p and p^2 - 2*q^2 are prime.
The least prime == 23 (mod 24) that is not in the sequence is 4079.
It appears that 5039 is also not in the sequence.
EXAMPLE
a(3) = 23 is in the sequence because 11^2 - 2*7^2 = 23 and 11, 7 and 23 are all primes.
MAPLE
# Note: a "false" result from the filter procedure for prime r == 23
# (mod 24) is not definitive. It is known that 4079 and 7703 are not in
# the sequence, but the status of 5039 has not been determined.
N:= 5000:
X1:= select(t -> isprime(t) and isprime(t^2-8), {seq(i, i=3..floor(sqrt(N+8)))}):
A1:= map(t -> t^2-8, X1):
X2:= select(t -> isprime(t) and isprime(t^2-18), {seq(i, i=3..floor(sqrt(N+18)))}):
A2:= map(t -> t^2-18, X2):
M:= <<3, 2>|<4, 3>>:
filter:= proc(r) local P1, S, C, k;
if not isprime(r) then return false fi;
P1:= select(t -> issqr(r+2*t^2), [$0..floor(2*sqrt(r))]);
S:= map(t -> <sqrt(r+2*t^2), t>, P1);
for k from 1 to 200 do
C:= select(t -> isprime(t[1]) and isprime(t[2]), S);
if C <> [] then return true fi;
S:= map(t -> M . t, S);
od;
false
end proc:
A3:= select(filter, {seq(i, i=23..N, 24)}):
sort(convert(A1 union A2 union A3, list));
MATHEMATICA
(* This empirical program confirms that, for instance, 2791 (p=53, q=3), 3463 (p=59, q=3), 5023 (p=71, q=3) and 6871 (p=83, q=3), are in the sequence. *)
kmax[10463 | 10799 | 14543 | 21599 | 34871 | 45263] = 40;
kmax[r_] = 12; (* kmax(r) is the maximum of Solve parameter C[1] *)
s[r_, k_] := Solve[p > 1 && q > 1 && p^2 - 2 q^2 == r, {p, q}, Primes] /. C[1] -> k // FullSimplify // DeleteCases[#, {p -> Undefined, q -> Undefined}]&;
filterQ[r_] := Module[{k, srk}, For[k = 1, k <= kmax[r], k++, srk = s[r, k]; If[srk != {} && FreeQ[srk, ConditionalExpression], Print[{r, k, srk, p^2 - 2 q^2 /. srk}]; Return[True]]]; False];
Select[Prime[Range[2, 5000]], filterQ] (* Jean-François Alcover, Oct 19 2020 *)
CROSSREFS
Sequence in context: A120681 A270951 A001132 * A254678 A165353 A048976
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 26 2019
STATUS
approved