A317724
Smallest prime q < A266829(n) such that both A266829(n)^(q-1) == 1 (mod q^2) and q^(A266829(n)-1) == 1 (mod A266829(n)^2), i.e., smallest prime q less than A266829(n) such that q and A266829(n) form a double Wieferich prime pair.
Original entry on oeis.org
2, 83, 2903, 911, 3, 5
Offset: 1
a(2) = 83, because 83 is the smallest prime q such that A266829(2) = 4871 satisfies both 4871^(q-1) == 1 (mod q^2) and q^(4871-1) == 1 (mod 4871^2).
-
forprime(p=3, , forprime(q=2, p-1, if(Mod(p, q^2)^(q-1)==1 && Mod(q, p^2)^(p-1)==1, print1(q, ", "); break)))
A297846
Primes p such that p is the largest member of a Wieferich tuple.
Original entry on oeis.org
71, 359, 487, 863, 1069, 1093, 1483, 1549, 2281, 3511, 4871, 6451, 6733, 7393, 12049, 13691, 14107, 14149, 15377, 17401, 18787, 20771, 29573, 32933, 35747, 39233, 44483, 46021, 48947, 49559, 54787, 54979, 59197, 60493, 69401, 69653, 77263, 77867, 105323, 122327
Offset: 1
The primes 31, 79, 251, 263, 421 and 1483 satisfy 31^(79-1) == 1 (mod 79^2), 79^(263-1) == 1 (mod 263^2), 263^(251-1) == 1 (mod 251^2), 251^(421-1) == 1 (mod 421^2), 421^(1483-1) == 1 (mod 1483^2) and 1483^(31-1) == 1 (mod 31^2), so those primes form a Wieferich tuple. Since 1483 is the largest member of the tuple, 1483 is a term of the sequence.
Supersequence of column 1 of
A271100.
-
findwiefs(vec, lim) = my(v=[]); for(k=1, #vec, forprime(p=1, lim, if(Mod(vec[k], p^2)^(p-1)==1, v=concat(v, [p])))); vecsort(v, , 8)
newprimes(v, w) = setminus(w, v)
is(n) = my(v=findwiefs([n], n), w=[], np=[]); while(1, w=findwiefs(v, n); if(newprimes(v, w)==[], return(0), if(setsearch(vecsort(newprimes(v, w)), n) > 0, return(1))); v=concat(v, newprimes(v, w)); v=vecsort(v, , 8))
forprime(p=1, , if(is(p), print1(p, ", ")))
A271100
Triangular array read by rows: T(n, k) = k-th largest member of lexicographically earliest Wieferich n-tuple that contains no duplicate members, read by rows, or T(n, k) = 0 if no Wieferich n-tuple exists.
Original entry on oeis.org
0, 1093, 2, 71, 11, 3, 3511, 19, 13, 2, 359, 331, 71, 11, 3, 359, 331, 307, 71, 11, 3, 359, 331, 307, 71, 19, 11, 3, 863, 359, 331, 71, 23, 13, 11, 3, 863, 359, 331, 307, 71, 19, 13, 11, 3, 863, 467, 359, 331, 307, 71, 19, 13, 11, 3
Offset: 1
For n = 1: There is no Wieferich singleton (1-tuple), because no prime p satisfies the congruence p^(p-1) == 1 (mod p^2), so T(1, 1) = 0.
For n = 4: The primes 3511, 19, 13, 2 satisfy the congruences 3511^(19-1) == 1 (mod 19^2), 19^(13-1) == 1 (mod 13^2), 13^(2-1) == 1 (mod 2^2) and 2^(3511-1) == 1 (mod 3511^2) and thus form a "Wieferich quadruple". Since this is the lexicographically earliest such set of primes, T(4, 1..4) = 3511, 19, 13, 2.
Triangle starts:
n=1: 0;
n=2: 1093, 2;
n=3: 71, 11, 3;
n=4: 3511, 19, 13, 2;
n=5: 359, 331, 71, 11, 3;
n=6: 359, 331, 307, 71, 11, 3;
n=7: 359, 331, 307, 71, 19, 11, 3;
n=8: 863, 359, 331, 71, 23, 13, 11, 3;
n=9: 863, 359, 331, 307, 71, 19, 13, 11, 3;
n=10: 863, 467, 359, 331, 307, 71, 19, 13, 11, 3;
....
-
ulimupto(u,{llim=2}) = {my(l=List());
forprime(i=nextprime(llim+1),u,if(Mod(llim,i^2)^(i-1)==1,listput(l,i)));l} \\ David A. Corneth, May 14 2016
\\tests if a tuple is a valid Wieferich n-tuple.
-
istuple(v) = {if(#Set(v)==#v,return(0));for(j=0,(#v-1)!-1, w=vector(#v,k,v[numtoperm(#v,j)[k]]); if(sum(i=2,#w,Mod(w[i-1],w[i]^2)^(w[i]-1)==1)+(Mod(w[1],w[#w])^(w[#w]-1)==1)==#w,return(1)));0} \\ David A. Corneth, May 15 2016
-
wief = DiGraph([prime_range(3600), lambda p, q: power_mod(p, q-1, q^2)==1])
sc = [[0]] + [sorted(c[1:], reverse=1) for c in wief.all_simple_cycles()]
tbl = [sorted(filter(lambda c: len(c)==n, sc))[0] for n in range(1, len(sc[-1]))]
for t in tbl: print('n=%d:'% len(t), ', '.join("%s"%i for i in t)) # Bruce Leenstra, May 18 2016
A282293
Two-column array A(n, k) read by rows, where A(n, 1) and A(n, 2) respectively give values of q and p in the n-th double Wieferich prime pair, where p > q. Terms sorted first by increasing size of p, then by increasing size of q.
Original entry on oeis.org
2, 1093, 83, 4871, 2903, 18787, 911, 318917, 3, 1006003, 5, 1645333507
Offset: 1
The primes 83 and 4871 satisfy 83^4870 == 1 (mod 23726641) and 4871^82 == 1 (mod 6889), respectively, so 83 and 4871 are terms of the sequence.
- M. Aaltonen and K. Inkeri, Catalan's equation x^p - y^p = 1 and related congruences, Math. Comp. 56 (1991), 359-370.
- R. Ernvall and T. Metsänkylä, On the p-divisibility of Fermat quotients, Mathematics of Computation 66 (1997), 1353-1365.
- K. Inkeri, On Catalan's problem, Acta Arithmetica 9 (1964), 285-290.
- W. Keller and J. Richstein, Solutions of the congruence a^p-1 == 1 (mod p^r), Mathematics of Computation, 74 (2005), 927-936.
- B. Logan and M. J. Mossinghoff, Double Wieferich pairs and circulant Hadamard matrices, ResearchGate, 2015.
- P. Mihailescu, A class number free criterion for catalan's conjecture, Journal of Number Theory, Vol. 99, No. 2 (2003), 225-231.
- C. Pomerance, J. L. Selfridge and S. S. Wagstaff, The pseudoprimes to 25 * 10^9, Mathematics of Computation, 35 (1980), 1003-1026.
- R. Scott and R. Styer, On p^x-q^y=c and related three term exponential Diophantine equations with prime bases, Journal of Number Theory, Vol. 105, No. 2 (2004), 212-234.
- R. Steiner, Class number bounds and Catalan's equation, Mathematics of Computation 67 (1998), 1317-1322.
-
is_dwpp(n, k) = Mod(n, k^2)^(k-1)==1 && Mod(k, n^2)^(n-1)==1
search(x, y) = forprime(p=x, y, forprime(q=1, p-1, if(is_dwpp(p, q), print1(q, ", ", p, ", "))))
search(1, 1e6) \\ search pairs in the interval [1, 10^6]
A274916
Triangle T(n, k) read by rows: sum of residues p^(q-1) (mod q^2) and q^(p-1) (mod p^2), where p = prime(n) and q = prime(k) for k = 1, 2, ...., n-1.
Original entry on oeis.org
7, 17, 13, 18, 47, 44, 59, 5, 94, 38, 41, 112, 25, 133, 242, 223, 172, 226, 74, 188, 204, 61, 344, 250, 249, 128, 344, 317, 395, 399, 339, 306, 262, 347, 398, 412, 31, 440, 355, 835, 757, 737, 300, 713, 772, 190, 535, 301, 808, 137, 1013, 738, 647, 730, 1119
Offset: 1
For n = 652 and k = 23: prime(23) = 83 and prime(652) = 4871. 83 and 4871 form a double Wieferich prime pair, so 83^4870 (mod 4871^2) = 1 and 4871^82 (mod 83^2) = 1, hence T(652, 23) = 1+1 = 2.
Triangle starts
7;
17, 13;
18, 47, 44;
59, 5, 94, 38;
41, 112, 25, 133, 242;
223, 172, 226, 74, 188, 204;
61, 344, 250, 249, 128, 344, 317;
395, 399, 339, 306, 262, 347, 398, 412;
31, 440, 355, 835, 757, 737, 300, 713, 772;
190, 535, 301, 808, 137, 1013, 738, 647, 730, 1119;
-
t(n, k) = lift(Mod(prime(n), prime(k)^2)^(prime(k)-1)) + lift(Mod(prime(k), prime(n)^2)^(prime(n)-1))
trianglerows(n) = for(x=2, n+1, for(y=1, x-1, print1(t(x, y), ", ")); print(""))
trianglerows(6) \\ print upper 6 rows of triangle
Showing 1-5 of 5 results.
Comments