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.

A343768 Primes p such that p^2 + 1 divides 3^(p+1) - 1.

This page as a plain text file.
%I A343768 #27 Jun 19 2021 20:27:08
%S A343768 3,5,47,1091,172681
%N A343768 Primes p such that p^2 + 1 divides 3^(p+1) - 1.
%C A343768 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
%C A343768 a(6) > 10^14. - _Martin Ehrenstein_, Jun 18 2021
%t A343768 a[n_Integer] := Select[ Prime@ Range@n, PowerMod[3, # + 1, #^2 + 1] == 1 &]; a[2*10^5] (* or *)
%t A343768 a[n_Integer] := If[ PrimeQ@n && Divisible[3^(n + 1) - 1, n^2 + 1] , Print@n]; Do[ a[n], {n, 2*10^5}]
%o A343768 (Python)
%o A343768 from sympy import primerange
%o A343768 def afind(limit):
%o A343768   for p in primerange(1, limit+1):
%o A343768     if pow(3, p+1, p**2+1) == 1: print(p, end=", ")
%o A343768 afind(10**6) # _Michael S. Branicky_, May 03 2021
%Y A343768 Cf. A001220, A014127.
%K A343768 nonn,hard,more
%O A343768 1,1
%A A343768 _Mikk Heidemaa_, Apr 28 2021