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.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21, 24, 30, 31, 34, 36, 42, 45, 49, 63
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 28 2021

Keywords

Comments

a(25) > 10^6 if it exists.
Numbers k such that A350399(k) = A002375(k).

Examples

			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.
5 is not a term because 2*5 = 10 = 3+7 = 5+5, but 3*7 == 1 (mod 10) and 1 is not prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(k) local p;
      p:= 1;
      while p <= k do
       p:= nextprime(p);
       if isprime(2*k-p) and not isprime(-p^2 mod 2*k) then return false fi
      od;
      true
    end proc:
    select(filter, [$1..1000]);
  • Mathematica
    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 *)