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.

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)))).

This page as a plain text file.
%I A357365 #9 Mar 25 2023 15:31:28
%S A357365 19,67,349,2011,22307,13699249,2018905087,9809844767
%N 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)))).
%o A357365 (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 A357365 forprime(p=11, , if(is(p), print1(p, ", ")))
%o A357365 (Python)
%o A357365 from sympy import nextprime
%o A357365 from itertools import islice
%o A357365 def agen():
%o A357365     p, m1, m2, m3, q = 2, 3, 5, 7, 11
%o A357365     while True:
%o A357365         if pow(p, q-1, q*q) == 1 or pow(q, p-1, p*p) == 1: yield q
%o A357365         p, m1, m2, m3, q = m1, m2, m3, q, nextprime(q)
%o A357365 print(list(islice(agen(), 5))) # _Michael S. Branicky_, Sep 30 2022
%Y A357365 Cf. A151799, A151800, A357362, A357363, A357364.
%K A357365 nonn,hard,more
%O A357365 1,1
%A A357365 _Felix Fröhlich_, Sep 25 2022
%E A357365 a(7)-a(8) from _Michael S. Branicky_, Sep 26 2022