A281001
Square array read by antidiagonals downwards: A(n, 1) = smallest Wieferich prime to base n and A(n, k) = smallest Wieferich prime to base A(n, k-1) for k > 1.
Original entry on oeis.org
1093, 2, 11, 1093, 71, 1093, 2, 3, 2, 2, 1093, 11, 1093, 1093, 66161, 2, 71, 2, 2, 2, 5, 1093, 3, 1093, 1093, 1093, 2, 3, 2, 11, 2, 2, 2, 1093, 11, 2, 1093, 71, 1093, 1093, 1093, 2, 71, 1093, 3, 2, 3, 2, 2, 2, 1093, 3, 2, 11, 71, 1093, 11, 1093, 1093, 1093, 2
Offset: 2
Array starts
1093, 2, 1093, 2, 1093, 2, ...
11, 71, 3, 11, 71, 3, ...
1093, 2, 1093, 2, 1093, 2, ...
2, 1093, 2, 1093, 2, 1093, ...
66161, 2, 1093, 2, 1093, 2, ...
5, 2, 1093, 2, 1093, 2, ...
....
-
smallestwieftobase(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
table(rows, cols) = for(x=2, rows+1, my(i=0, w=smallestwieftobase(x)); while(i < cols, print1(w, ", "); w=smallestwieftobase(w); i++); print(""))
table(7, 5) \\ print initial 5 terms of upper 7 rows of array
A288097
Square array read by antidiagonals downwards: A(n, 1) = smallest base-prime(n) Wieferich prime and A(n, k) = smallest base-A(n, k-1) Wieferich prime for k > 1.
Original entry on oeis.org
1093, 2, 11, 1093, 71, 2, 2, 3, 1093, 5, 1093, 11, 2, 2, 71, 2, 71, 1093, 1093, 3, 2, 1093, 3, 2, 2, 11, 1093, 2, 2, 11, 1093, 1093, 71, 2, 1093, 3, 1093, 71, 2, 2, 3, 1093, 2, 11, 13, 2, 3, 1093, 1093, 11, 2, 1093, 71, 2, 2, 1093, 11, 2, 2, 71, 1093, 2, 3, 1093, 1093, 7
Offset: 1
Array starts
1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093, 2
11, 71, 3, 11, 71, 3, 11, 71, 3, 11
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
5, 2, 1093, 2, 1093, 2, 1093, 2, 1093, 2
71, 3, 11, 71, 3, 11, 71, 3, 11, 71
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
3, 11, 71, 3, 11, 71, 3, 11, 71, 3
13, 2, 1093, 2, 1093, 2, 1093, 2, 1093, 2
2, 1093, 2, 1093, 2, 1093, 2, 1093, 2, 1093
-
f[n_] := Block[{p = 2}, While[! Divisible[n^(p - 1) - 1, p^2], p = NextPrime@ p]; p]; T[n_, k_] := T[n, k] = If[k == 1, f@ Prime@ n, f@ T[n, k - 1]]; Table[Function[n, T[n, k]][m - k + 1], {m, 12}, {k, m, 1, -1}] // Flatten (* Michael De Vlieger, Jun 06 2017 *)
-
a039951(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
table(rows, cols) = forprime(p=1, prime(rows), my(i=0, w=a039951(p)); while(i < cols, print1(w, ", "); w=a039951(w); i++); print(""))
table(10, 10) \\ print initial 10 rows and 10 columns of table
A289899
Primes that are the largest member of a Wieferich cycle.
Original entry on oeis.org
71 is a term, since A039951(71) = 3, A039951(3) = 11 and A039951(11) = 71, so {3, 11, 71} is a Wieferich cycle of length 3 and 71 is the largest member of that cycle.
-
leastwieferich(base, bound) = forprime(p=1, bound, if(Mod(base, p^2)^(p-1)==1, return(p))); 0
is(n) = my(v=[leastwieferich(n, n)]); while(1, if(v[#v]==0, return(0), v=concat(v, leastwieferich(v[#v], n))); my(x=#v-1); while(x > 1, if(v[#v]==v[x], if(n==vecmax(v), return(1), return(0))); x--))
forprime(p=1, , if(is(p), print1(p, ", ")))
Showing 1-3 of 3 results.
Comments