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!)
A340868 Numbers k such that prime(k)^prime(k+1) == prime(k+3) (mod prime(k+2)). 2

%I

%S 15,52,701,26017,579994,1131833

%N Numbers k such that prime(k)^prime(k+1) == prime(k+3) (mod prime(k+2)).

%C For prime(k)^prime(k+1) == prime(k+2) (mod prime(k+3)), the first two examples are k = 942 and k = 4658911.

%e Primes number 52 to 55 are 239, 241, 251, 257, and 239^241 == 257 == 6 (mod 251), so 52 is in the sequence.

%p q:= 2: r:= 3: s:= 5: R:= NULL: count:= 0:

%p for k from 1 while count < 6 do

%p p:= q; q:= r; r:= s; s:= nextprime(s);

%p if p &^ q - s mod r = 0 then count:= count+1; R:= R, k fi

%p od:

%p R;

%o (Python)

%o from sympy import nextprime

%o k,p,q,r,s,A340868_list = 1,2,3,5,7,[]

%o while k < 10**7:

%o if pow(p,q,r) == s % r:

%o A340868_list.append(k)

%o k,p,q,r,s = k+1,q,r,s,nextprime(s) # _Chai Wah Wu_, Jan 25 2021

%Y Cf. A340876.

%K nonn,more

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Jan 24 2021

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 September 28 17:33 EDT 2021. Contains 347716 sequences. (Running on oeis4.)