cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A297620 Positive numbers n such that n^2 == p (mod q) and n^2 == q (mod p) for some consecutive primes p,q.

This page as a plain text file.
%I A297620 #12 Jan 02 2018 04:38:03
%S A297620 6,10,12,24,42,48,62,72,76,84,90,93,108,110,120,122,128,145,146,174,
%T A297620 187,188,194,204,208,215,220,228,232,240,241,264,297,306,310,314,317,
%U A297620 326,329,336,349,357,366,372,386,408,410,423,426,431,444,454,456,468,470,474,518,522,535,538,546,548
%N A297620 Positive numbers n such that n^2 == p (mod q) and n^2 == q (mod p) for some consecutive primes p,q.
%C A297620 Positive numbers n such that n^2 == p+q mod (p*q) for some consecutive primes p, q.
%C A297620 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.
%C A297620 Odd terms of this sequence are 93, 145, 187, 215, 241, 297, 317, 329, 349, 357, 423, 431, 535, ... - _Altug Alkan_, Jan 01 2018
%H A297620 Robert Israel, <a href="/A297620/b297620.txt">Table of n, a(n) for n = 1..2305</a>
%e A297620 a(3) = 12 is in the sequence because 71 and 73 are consecutive primes with 12^2 == 73 (mod 71) and 12^2 == 71 (mod 73).
%p A297620 N:= 1000: # to get all terms <= N
%p A297620 R:= {}:
%p A297620 q:= 3:
%p A297620 while q < N^2 do
%p A297620   p:= q;
%p A297620   q:= nextprime(q);
%p A297620   if ((p mod 4 <> 3) or (q mod 4 <> 3)) and numtheory:-quadres(q,p) = 1 then
%p A297620     xp:= numtheory:-msqrt(q,p); xq:= numtheory:-msqrt(p,q);
%p A297620     for sp in [-1,1] do for sq in [-1,1] do
%p A297620       v:= chrem([sp*xp,sq*xq],[p,q]);
%p A297620       R:= R union {seq(v+k*p*q, k = 0..(N-v)/(p*q))}
%p A297620     od od;
%p A297620   fi;
%p A297620 od:
%p A297620 sort(convert(R,list));
%Y A297620 Contains A074924.
%K A297620 nonn
%O A297620 1,1
%A A297620 _Robert Israel_ and _Thomas Ordowski_, Jan 01 2018