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.

Showing 1-3 of 3 results.

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

Views

Author

Felix Fröhlich, Jan 12 2017

Keywords

Comments

Row n becomes periodic, repeating the terms 2, 1093 if n is in A252801 when n is prime or if A039951(n) is in A252801 when n is composite.
Row n becomes periodic, repeating the terms 3, 11, 71 if n is in A252802 when n is prime or if A039951(n) is in A252802 when n is composite.
Row n becomes periodic, repeating the terms 83, 4871 if n is in A252812 when n is prime or if A039951(n) is in A252812 when n is composite.

Examples

			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, ...
  ....
		

Crossrefs

Programs

  • PARI
    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

Views

Author

Felix Fröhlich, Jun 05 2017

Keywords

Examples

			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
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    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

Extensions

More terms from Michael De Vlieger, Jun 06 2017

A289899 Primes that are the largest member of a Wieferich cycle.

Original entry on oeis.org

71, 1093, 4871
Offset: 1

Views

Author

Felix Fröhlich, Jul 14 2017

Keywords

Comments

A Wieferich cycle is a repeating cycle in the trajectory of p under successive applications of the map p -> A039951(p), i.e., a part of a row of A288097 repeating indefinitely.
The above cycles could more precisely be called "order-1 Wieferich cycles". A cycle in a row of A281002 could be called an "order-2 Wieferich cycle".
The cycles corresponding to a(1)-a(3) are {3, 11, 71}, {2, 1093} and {83, 4871}, respectively.
The order of the cycle is not to be confused with its length. The order-1 cycle {3, 11, 71} is a cycle of length 3, while the order-1 cycles {2, 1093} and {83, 4871} are cycles of length 2.
Wieferich cycles are special cases of Wieferich tuples (cf. A271100).
a(4) > 20033669 if it exists.

Examples

			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.
		

Crossrefs

Programs

  • PARI
    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.