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.

A385856 Near-Wieferich primes (primes p satisfying 2^p == 2 + A*p (mod p^2)) with |A| <= 10.

This page as a plain text file.
%I A385856 #70 Jul 26 2025 14:38:46
%S A385856 2,3,5,7,11,13,17,19,29,37,41,43,47,71,157,173,211,251,263,379,383,
%T A385856 1093,1097,1699,1753,2633,2659,3373,3511,3593,5501,8089,10691,15823,
%U A385856 27967,30577,45827,46477,1437049,1483597,1897121,2152849,6266543,52368101,110057537,126233057,1683955849,2001907169,13211006161,47004625957
%N A385856 Near-Wieferich primes (primes p satisfying 2^p == 2 + A*p (mod p^2)) with |A| <= 10.
%C A385856 Near-Wieferich primes: 2^p == 2 + A*p (mod p^2) for |A| <= 10. Extends the Wieferich condition by allowing small symmetric offsets.
%C A385856 See also A246568 for a related formulation involving the same congruence structure.
%C A385856 All values verified for p <= 5*10^10.
%H A385856 A. Lamek, <a href="https://oeis.org/wiki/User:A._Lamek">User profile with notes on Wieferich-related structures</a>
%e A385856 p=11: 2^11 == 2048 == 2+(-1)*11 == -9 == 112 (mod 121), so A=-1.
%e A385856 p=5: 2^5 == 32 == 2+1*5 == 7 (mod 25), so A=1.
%t A385856 isokQ[p_] := Module[{A}, A = Quotient[PowerMod[2, p, p^2] - 2, p]; A <= 10 || p - A <= 10]
%o A385856 (Python)
%o A385856 def is_a385856(p):
%o A385856     A = ((pow(2, p, p*p)-2) // p) % p
%o A385856     return (A<=10) or (p-A<=10)
%o A385856 (PARI) isok(p) = lift(Mod(2, p^2)^p-2+10*p) <= 20*p; \\ _Michel Marcus_, Jul 12 2025
%Y A385856 Cf. A001220, A246568.
%K A385856 nonn
%O A385856 1,1
%A A385856 _A. Lamek_, Jul 10 2025
%E A385856 a(44)-a(46) from _Michel Marcus_, Jul 12 2025
%E A385856 a(48) from _Jinyuan Wang_, Jul 13 2025