login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338704 Products p*q*r of three distinct primes such that (p*q) mod r, (p*r) mod q and (q*r) mod p are all prime. 2
1023, 1885, 2635, 3857, 4433, 4623, 5883, 7579, 7611, 8987, 9447, 11607, 13949, 14053, 14573, 14839, 14965, 15189, 15265, 16287, 17507, 19599, 20661, 21535, 22119, 23433, 24827, 24963, 25359, 25517, 26781, 30385, 30709, 31537, 34715, 36499, 38121, 38315, 38533, 39479, 39867, 41287, 41915, 42107 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(3)=2635 is a term because 2635=5*17*31 with (5*17) mod 31 = 23, (5*31) mod 17 = 2 and (17*31) mod 5 = 2 all prime.

MAPLE

N:= 10^5: # for terms <= N

P:= select(isprime, [seq(i, i=3..floor(sqrt(N)), 2)]):

R:= NULL:

for i from 1 to nops(P) do

  p:= P[i];

  for j from 1 to i-1 do

    q:= P[j];

    if 3*q*p > N then break fi;

    for k from 1 to j-1 do

      r:= P[k];

      if r*q*p > N or r > p*q then break fi;

      if isprime(p*q mod r) and isprime(p*r mod q) and isprime(q*r mod p) then

         R:=R, p*q*r;

      fi

od od od:

sort([R]);

MATHEMATICA

Block[{a = {}, nn = 42500}, Do[Do[Do[If[And[Length@ Union[{#1, #2, #3}] == 3, AllTrue[{Mod[#1 #2, #3], Mod[#1 #3, #2], Mod[#2 #3, #1]}, PrimeQ]], AppendTo[a, #1 #2 #3]] & @@ {Prime[i], Prime[j], Prime[k]}, {k, j - 1}], {j, i - 1}], {i, PrimePi@ Floor[Sqrt[nn]]}]; TakeWhile[Union@ a, # <= nn &]] (* Michael De Vlieger, Nov 05 2020 *)

Select[Union[Times@@@Select[Subsets[Prime[Range[50]], {3}], AllTrue[{ Mod[ #[[1]]#[[2]], #[[3]]], Mod[#[[2]]#[[3]], #[[1]]], Mod[#[[1]]#[[3]], #[[2]]]}, PrimeQ]&]], #<=50000&] (* Harvey P. Dale, Aug 11 2021 *)

CROSSREFS

Contains A338705.

Sequence in context: A031969 A166512 A038461 * A158421 A023060 A223079

Adjacent sequences:  A338701 A338702 A338703 * A338705 A338706 A338707

KEYWORD

nonn

AUTHOR

J. M. Bergot and Robert Israel, Nov 05 2020

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 27 07:28 EST 2021. Contains 349365 sequences. (Running on oeis4.)