login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343768
Primes p such that p^2 + 1 divides 3^(p+1) - 1.
0
3, 5, 47, 1091, 172681
OFFSET
1,1
COMMENTS
a(n) != 13 (mod 20) and a(n) != 17 (mod 20). Proof: Write n=20*k + 13, and then show that n^2 + 1 == 0 (mod 5) and 3^(n+1) - 1 == 3 (mod 5). Because of its factor 5 the former cannot divide the latter. - Martin Ehrenstein, Jun 06 2021
a(6) > 10^14. - Martin Ehrenstein, Jun 18 2021
MATHEMATICA
a[n_Integer] := Select[ Prime@ Range@n, PowerMod[3, # + 1, #^2 + 1] == 1 &]; a[2*10^5] (* or *)
a[n_Integer] := If[ PrimeQ@n && Divisible[3^(n + 1) - 1, n^2 + 1] , Print@n]; Do[ a[n], {n, 2*10^5}]
PROG
(Python)
from sympy import primerange
def afind(limit):
for p in primerange(1, limit+1):
if pow(3, p+1, p**2+1) == 1: print(p, end=", ")
afind(10**6) # Michael S. Branicky, May 03 2021
CROSSREFS
Sequence in context: A307632 A227743 A335752 * A235356 A347593 A120426
KEYWORD
nonn,hard,more
AUTHOR
Mikk Heidemaa, Apr 28 2021
STATUS
approved