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-7 of 7 results.

A252801 Primes whose trajectories under the map x -> A039951(x) enter the cycle {2, 1093}.

Original entry on oeis.org

2, 5, 7, 13, 17, 23, 29, 31, 37, 41, 43
Offset: 1

Views

Author

Felix Fröhlich, Dec 22 2014

Keywords

Examples

			The trajectory of 31 under the given map starts 31, 7, 5, 2, 1093, 2, 1093, ..., entering the given cycle, so 31 is a term of the sequence.
		

Crossrefs

Extensions

Name edited by Felix Fröhlich, Jun 19 2021

A252802 Primes whose trajectory under the map x -> A039951(x) enters the cycle {3, 11, 71}.

Original entry on oeis.org

3, 11, 19
Offset: 1

Views

Author

Felix Fröhlich, Dec 22 2014

Keywords

Comments

From Felix Fröhlich, Jul 01 2021: (Start)
Further terms in the sequence are 71, 107, 127, 139, 167, 179, etc. The smallest prime where it is unknown whether it is in this sequence (or in A252801 or A252812) is 47.
Is A000040 the union of this sequence, A252801 and A252812? (End)

Examples

			The trajectory of 19 under the given map starts 19, 3, 11, 71, 3, ..., entering the given cycle, so 19 is a term of the sequence.
		

Crossrefs

Extensions

Name edited by Felix Fröhlich, Jun 19 2021

A268479 For p = prime(n), number of primes (including p) in the trajectory of p under the procedure in A244550, also allowing the Wieferich prime 2, that are not terms of a repeating cycle.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Feb 05 2016

Keywords

Comments

a(15) is unknown, since there is no known Wieferich prime to base 47 (cf. Fischer link).

Examples

			The trajectory of 31 starts 31, 7, 5, 2, 1093, 2, 1093, 2, 1093,  ...., entering a repeating cycle consisting of the terms 2 and 1093. There are three terms before the cycle, so a(11) = 3.
		

Crossrefs

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

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-7 of 7 results.