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.

A269111 a(n) = length of the repeating part of row n of A288097.

Original entry on oeis.org

2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Felix Fröhlich, Feb 19 2016

Keywords

Comments

a(n) + A268479(n) = total number of different terms in the trajectory of p.
a(15) is unknown, since there is no known Wieferich prime in base 47 (cf. Fischer link).
Obviously, a(n) != 1 for all n.
Period length of the repeating part of prime(n)-th row of A281001. - Felix Fröhlich, Jan 14 2017

Examples

			The trajectory of 31 starts 31, 7, 5, 2, 1093, 2, 1093, 2, 1093,  ...., entering a repeating cycle of length 2, so a(11) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length@ DeleteCases[Values@ PositionIndex@ NestList[Function[n, Block[{p = 2}, While[! Divisible[n^(p - 1) - 1, p^2], p = NextPrime@ p]; p]], Prime@ n, 12], ?(Length@ # == 1 &)], {n, 12}] (* _Michael De Vlieger, Jun 06 2017, Version 10 *)
  • PARI
    a039951(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p)))
    trajectory(n, terms) = my(v=[n]); while(#v < terms, v=concat(v, a039951(v[#v]))); v
    a(n) = my(p=prime(n), i=0, len=2, t=trajectory(p, len), k=#t); while(1, while(k > 1, k--; if(t[k]==t[#t], return(#t-k))); len++; t=trajectory(p, len); k=#t) \\ Felix Fröhlich, Jan 14 2017

Extensions

Definition simplified by Felix Fröhlich, Jun 05 2017

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.