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

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

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

A252812 Primes whose trajectories under the map x -> A039951(x) enter the cycle {83, 4871} (conjectured).

Original entry on oeis.org

83, 4871, 8179, 11423, 14071, 16411, 29191, 29531, 35267, 41603, 47963, 56747, 58963, 61331, 68791, 68891, 76039, 82267, 94811, 96739, 110063, 122027, 124823, 156631, 175939, 179383, 183091, 188563, 192991, 198491, 206939, 216119, 219523, 231871, 232591
Offset: 1

Views

Author

Felix Fröhlich, Dec 22 2014

Keywords

Comments

This sequence may contain gaps, as there are some prime bases for which no Wieferich primes are known. Those bases are 47, 139, 311, 347, 983, .... (see Fischer link).
Any prime whose trajectory leads to a prime in this sequence is also a term of the sequence. Therefore, if the trajectory of any of the bases mentioned in the previous comment leads to a term in the sequence, then that base and any prime bases where it is the smallest Wieferich prime are also terms. - Felix Fröhlich, Mar 25 2015

Examples

			The trajectory of 8179 under the given map starts 8179, 83, 4871, 83, 4871, ..., entering the given cycle, so 8179 is a term of the sequence.
		

Crossrefs

Extensions

More terms via computing prime bases with smallest Wieferich prime 83 from Felix Fröhlich, Mar 25 2015
Name edited by Felix Fröhlich, Jun 19 2021

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

A359952 Wieferich sequence where a(1) = 2.

Original entry on oeis.org

2, 1093, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043, 5, 20771, 18043
Offset: 1

Views

Author

Robert C. Lyons, Jan 19 2023

Keywords

Comments

Starting with a(3), the sequence is periodic with the following cycle, which is a Wieferich triplet: 5, 20771, 18043.

Crossrefs

Programs

  • PARI
    i=0; a=2; print1(a, ", "); while(i<100, forprime(p=2, 10^6, if(Mod(a, p^2)^(p-1)==1 && p%2!=0 && ((a-1) % p^2) && ((a+1) % p^2), print1(p, ", "); i++; a=p; break({n=1})))) \\ Michel Marcus, Jan 21 2023
  • Python
    from sympy import nextprime
    from gmpy2 import powmod
    max_n = 45
    a = 2
    seq = [a]
    for i in range(2, max_n+1):
        p = 2
        while True:
            p_squared = p*p
            if powmod(a, p-1, p_squared) == 1 and (a-1) % p_squared != 0 and (a+1) % p_squared != 0:
                seq.append(p)
                a = p
                break
            else:
                p = nextprime(p)
    print(seq)
    
Showing 1-6 of 6 results.