The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357365 Primes q such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where p = A151799(A151799(A151799(A151799(q)))). 3

%I #9 Mar 25 2023 15:31:28

%S 19,67,349,2011,22307,13699249,2018905087,9809844767

%N Primes q such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where p = A151799(A151799(A151799(A151799(q)))).

%o (PARI) is(n) = my(b=precprime(precprime(precprime(precprime(n-1)-1)-1)-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1

%o forprime(p=11, , if(is(p), print1(p, ", ")))

%o (Python)

%o from sympy import nextprime

%o from itertools import islice

%o def agen():

%o p, m1, m2, m3, q = 2, 3, 5, 7, 11

%o while True:

%o if pow(p, q-1, q*q) == 1 or pow(q, p-1, p*p) == 1: yield q

%o p, m1, m2, m3, q = m1, m2, m3, q, nextprime(q)

%o print(list(islice(agen(), 5))) # _Michael S. Branicky_, Sep 30 2022

%Y Cf. A151799, A151800, A357362, A357363, A357364.

%K nonn,hard,more

%O 1,1

%A _Felix Fröhlich_, Sep 25 2022

%E a(7)-a(8) from _Michael S. Branicky_, Sep 26 2022

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 22 13:22 EDT 2024. Contains 372755 sequences. (Running on oeis4.)