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.

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

This page as a plain text file.
%I A357362 #12 Mar 25 2023 15:30:59
%S A357362 7,53,59,151057,240733,911135857
%N A357362 Primes q such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where p = A151799(q).
%o A357362 (PARI) is(n) = my(b=precprime(n-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1
%o A357362 forprime(p=3, , if(is(p), print1(p, ", ")))
%o A357362 (Python)
%o A357362 from sympy import nextprime
%o A357362 from itertools import islice
%o A357362 def agen():
%o A357362     p, q = 2, 3
%o A357362     while True:
%o A357362         if pow(p, q-1, q*q) == 1 or pow(q, p-1, p*p) == 1: yield q
%o A357362         p, q = q, nextprime(q)
%o A357362 print(list(islice(agen(), 5))) # _Michael S. Branicky_, Sep 30 2022
%Y A357362 Cf. A151799, A151800, A357363, A357364, A357365.
%K A357362 nonn,hard,more
%O A357362 1,1
%A A357362 _Felix Fröhlich_, Sep 25 2022
%E A357362 a(6) from _Michael S. Branicky_, Sep 26 2022