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.
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..586
R. Israel et al., Mathematics StackExchange, p^2 - 2 q^2 = 5039 for primes p,q
Robert Israel, Possibly incomplete list of 1043 members of the sequence
Robert Israel, Numbers that may or may not be 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
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 26 2019
STATUS
approved