Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #4 Oct 01 2022 19:35:19
%S 5,19,263,1667
%N Primes p such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where q = A151800(A151800(p)).
%o (PARI) is(n) = my(b=precprime(precprime(n-1)-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1
%o forprime(p=5, , if(is(p), print1(p, ", ")))
%Y Cf. A151800, A357362, A357364, A357365.
%K nonn,hard,more
%O 1,1
%A _Felix Fröhlich_, Sep 25 2022