login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A359952 Wieferich sequence where a(1) = 2. 0
2, 1093, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Starting with a(3), the sequence is periodic with the following cycle, which is a Wieferich triplet: 5, 20771, 18043.
LINKS
Wikipedia, Wieferich sequence.
Wikipedia, Wieferich prime.
Wikipedia, Wieferich pair.
PROG
(Python)
from sympy import nextprime
from gmpy2 import powmod
max_n = 45
a = 2
seq = [a]
for i in range(2, max_n+1):
p = 2
while True:
p_squared = p*p
if powmod(a, p-1, p_squared) == 1 and (a-1) % p_squared != 0 and (a+1) % p_squared != 0:
seq.append(p)
a = p
break
else:
p = nextprime(p)
print(seq)
(PARI) i=0; a=2; print1(a, ", "); while(i<100, forprime(p=2, 10^6, if(Mod(a, p^2)^(p-1)==1 && p%2!=0 && ((a-1) % p^2) && ((a+1) % p^2), print1(p, ", "); i++; a=p; break({n=1})))) \\ Michel Marcus, Jan 21 2023
CROSSREFS
Sequence in context: A344669 A321633 A244550 * A039951 A247072 A282293
KEYWORD
nonn
AUTHOR
Robert C. Lyons, Jan 19 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 23:38 EDT 2024. Contains 372141 sequences. (Running on oeis4.)