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.

A350398 Numbers k such that for all pairs of primes p,q with p+q = 2*k, p*q mod 2*k is prime.

This page as a plain text file.
%I A350398 #8 Dec 30 2021 07:27:46
%S A350398 1,3,4,6,7,8,9,10,11,12,13,14,15,16,21,24,30,31,34,36,42,45,49,63
%N A350398 Numbers k such that for all pairs of primes p,q with p+q = 2*k, p*q mod 2*k is prime.
%C A350398 a(25) > 10^6 if it exists.
%C A350398 Numbers k such that A350399(k) = A002375(k).
%e A350398 a(5) = 7 is a term because 2*7 = 14 = 3+11 = 7+7, with 3*11 == 5 (mod 14) and 7*7 == 7 (mod 14), and both 5 and 7 are prime.
%e A350398 5 is not a term because 2*5 = 10 = 3+7 = 5+5, but 3*7 == 1 (mod 10) and 1 is not prime.
%p A350398 filter:= proc(k) local p;
%p A350398   p:= 1;
%p A350398   while p <= k do
%p A350398    p:= nextprime(p);
%p A350398    if isprime(2*k-p) and not isprime(-p^2 mod 2*k) then return false fi
%p A350398   od;
%p A350398   true
%p A350398 end proc:
%p A350398 select(filter, [$1..1000]);
%t A350398 q[k_] := AllTrue[Select[Range[2, 2*k], PrimeQ], ! PrimeQ[2*k - #] || PrimeQ[Mod[#*(2*k - #), 2*k]] &]; Select[Range[100], q] (* _Amiram Eldar_, Dec 28 2021 *)
%Y A350398 Cf. A002375, A350399.
%K A350398 nonn,more
%O A350398 1,2
%A A350398 _J. M. Bergot_ and _Robert Israel_, Dec 28 2021