proposed
approved
proposed
approved
editing
proposed
Robert Israel, <a href="/A297620/b297620.txt">Table of n, a(n) for n = 1..2305</a>
a(3) = 12 is in the sequence because 71 and 71 73 are consecutive primes with 12^2 == 73 (mod 71) and 12^2 == 71 (mod 73).
proposed
editing
editing
proposed
Odd terms of this sequence are 93, 145, 187, 215, 241, 297, 317, 329, 349, 357, 423, 431, 535, ... - Altug Alkan, Jan 01 2018
Odd terms of this sequence are 93, 145, 187, 215, 241, 297, 317, 329, 349, 357, 423, 431, ... - Altug Alkan, Jan 01 2018
proposed
editing
editing
proposed
newR:={seq(seq(chrem([sp*xp, sq*xq], [p, q]), sp=[-1, 1]), sq=[-1, 1])};
Positive numbers n such that n^2 == p+q mod (p*q) for some consecutive primes p, q.
Each pair of consecutive primes p,q such that p is a quadratic residue mod q and p and q are not both == 3 (mod 4) contributes infinitely many members to the sequence.
N:= 1000: # to get all terms <= N
R:= {}:
q:= 3:
while q < N^2 do
p:= q;
q:= nextprime(q);
if ((p mod 4 <> 3) or (q mod 4 <> 3)) and numtheory:-quadres(q, p) = 1 then
xp:= numtheory:-msqrt(q, p); xq:= numtheory:-msqrt(p, q);
newR:={seq(seq(chrem([sp*xp, sq*xq], [p, q]), sp=[-1, 1]), sq=[-1, 1])};
for sp in [-1, 1] do for sq in [-1, 1] do
v:= chrem([sp*xp, sq*xq], [p, q]);
R:= R union {seq(v+k*p*q, k = 0..(N-v)/(p*q))}
od od;
fi;
od:
sort(convert(R, list));