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
19, 67, 349, 2011, 22307, 13699249, 2018905087, 9809844767 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
PROG
(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
forprime(p=11, , if(is(p), print1(p, ", ")))
(Python)
from sympy import nextprime
from itertools import islice
def agen():
p, m1, m2, m3, q = 2, 3, 5, 7, 11
while True:
if pow(p, q-1, q*q) == 1 or pow(q, p-1, p*p) == 1: yield q
p, m1, m2, m3, q = m1, m2, m3, q, nextprime(q)
print(list(islice(agen(), 5))) # Michael S. Branicky, Sep 30 2022
CROSSREFS
Sequence in context: A142404 A139927 A337197 * A228670 A044157 A044538
KEYWORD
nonn,hard,more
AUTHOR
Felix Fröhlich, Sep 25 2022
EXTENSIONS
a(7)-a(8) from Michael S. Branicky, Sep 26 2022
STATUS
approved

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 3 23:22 EDT 2024. Contains 372225 sequences. (Running on oeis4.)