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.

A082449 Let f(p) = greatest prime divisor of p-1. Sequence gives smallest prime which takes at least n steps to reach 2 when f is iterated.

Original entry on oeis.org

2, 3, 7, 23, 47, 283, 719, 1439, 2879, 34549, 138197, 1266767, 14619833, 36449279, 377982107, 1432349099, 22111003847
Offset: 0

Views

Author

N. J. A. Sloane, Apr 25 2003

Keywords

Comments

There is a remarkable and unexplained agreement: if 3 and 7 are replaced by 11 and 14619833 is replaced by 14920303, the result is sequence A056637 (least prime of class n-, according to the Erdős-Selfridge classification of primes).
From David A. Corneth, Oct 18 2016: (Start):
If a(n) * k + 1 is prime then a(n + 1) <= a(n) * k + 1.
a(18), a(19), ..., a(23) <= 309554053859, 619108107719, 19811459447009, 433142367554861, 866284735109723, 22523403112852799 respectively. (End)
Conjecture: a(n) is the smallest prime p such that b(p) = n, where f(2) = 0 and for an odd prime p, f(p) = 1 + max{q|(p-1), q prime} f(q). In other words, a(n) is the smallest prime p such that A364332(primepi(p)) = n. Verified for n <= 13. - Jianing Song, Apr 28 2024

Examples

			a(2) = 7 since 7 -> 3 -> 2 takes two steps, and smaller primes require less than 2 steps.
For p = 2879, 8 steps are needed (2879 -> 1439 -> 719 -> 359 -> 179 -> 89 -> 11 -> 5 -> 2), so a(8) = 2879, since smaller primes require less than 8 steps.
		

References

  • Steven G. Johnson, Postings to Number Theory List, Apr 23 and Apr 25, 2003.

Crossrefs

Programs

  • Mathematica
    (* Assuming a(n) > 2 a(n-1) if n>1 *) Clear[a, f]; f[p_] := FactorInteger[p - 1][[-1, 1]]; f[2] = 2; a[n_] := a[n] = For[p = NextPrime[2 a[n-1]], True, p = NextPrime[p], k = 0; If[Length[FixedPointList[f, p]] == n+2, Return[p]]]; a[0]=2; a[1]=3; Table[Print[a[n]]; a[n], {n, 0, 16}] (* Jean-François Alcover, Oct 18 2016 *)

Extensions

Edited by Klaus Brockhaus, May 01 2003
a(16) from Donovan Johnson, Nov 17 2008

A364332 a(n) = f(prime(n)), where f(2) = 0 and for an odd prime p, f(p) = max{f(q)+1: q ranges over all prime factors of p-1}.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 1, 2, 3, 3, 2, 2, 2, 3, 4, 3, 4, 2, 3, 3, 2, 3, 3, 3, 2, 2, 2, 4, 2, 3, 3, 3, 2, 4, 3, 2, 3, 2, 4, 4, 4, 2, 3, 2, 3, 3, 3, 3, 4, 3, 4, 3, 2, 2, 1, 4, 4, 2, 4, 3, 5, 3, 2, 3, 3, 4, 3, 3, 5, 4, 3, 5, 3, 3, 3, 4, 3, 3, 2, 2, 3, 3, 4, 2, 3, 3, 3, 3, 4, 3, 5, 4, 2, 3, 4, 3, 4, 3, 4
Offset: 1

Views

Author

Steven Lu, Jul 18 2023

Keywords

Comments

This sequence is related to a problem about googology (see Zhihu).
There are three numbers named A, B and C, and initially A>1, and B=C=0.
Now take the following steps:
Step 1. Let B=B+1, C=C+1.
Step 2. Check if A is divisible by (B+1). If yes, go to Step 3; if no, go back to Step 1.
Step 3. Let A=A/(B+1)*B^C.
Step 4. Let B=0.
Step 5. If A=1, then stop, otherwise go back to Step 1.
This program will always stop. When the program stops, C will be a very large number.
When Step 3 reached, B+1 will be the smallest prime factor of A, and this factor is eliminated while some smaller factors; i.e., factors of B, are added.
The properties of this problem rely on the prime factors of A. A can be described by the ordinal: O(A) = n_(k-1)*omega^(l_(k-1)) + ... + n_2*omega^(l_2) + n_1*omega^(l_1) + n_0 where A = 2^(n_0) * 3^(n_1) * 5^(n_2) * p(k)^(n_(k-1)). Every operation will monotonically decrease the ordinal.
Note that the exponential of omega in each term is l_k instead of k, and this is because the correspondence between prime factors and powers of omega is more complicated than "p(k+1) to omega^k".
When B+1=2, the increase of C is only 1, then every prime factor 2 corresponds ordinal 1, or omega^0. This agrees with a(p)=0 when p=2 in this sequence.
When B+1=3, any number of exponential of 2 can be increased, then every prime factor 3 corresponds ordinal omega.
When B+1=5, only the power of 2 can be increased as well, then prime factor 5 also corresponds omega.
When B+1=7, any number of exponentials of 2 and 3 can be both increased, then the corresponding ordinal is (1+omega)*omega=omega*omega=omega^2.
The rule is, the power of omega for a given prime number p equals the maximum among those for prime factors of (p-1), plus one.
This sequence is similar to but different from A083647, the difference begins at the 52nd term; i.e. for p=239. That is because 238=2*7*17 and a(7)=3>2=a(17) although 7<17.
From Jianing Song, Apr 28 2024: (Start)
a(n) is one less than the maximum length of a sequence d_0 = prime(n), d_1, ..., d_m = 2 such that d_i is a prime factor of d_{i-1} - 1. For example, for n = 52 (then prime(n) = 239), we have a(n) = 3 since that a sequence with maximum length is 239, 7, 3, 2. It is clear that a(n) >= A083647(n), as the latter takes d_i to be largest prime factor of d_{i-1} - 1.
Conjecture: the smallest prime p such that f(p) = m (namely a(primepi(p)) = m) is p = A082449(m). Verified for m <= 13. (End)

Examples

			For p=443, we have 442=2*13*17, and f(2)=0, f(13)=2, f(17)=1. The maximum among them is 2, so f(443)=3, or a(86)=3.
		

Crossrefs

Cf. A364334, A082449. Different from A083647.

Programs

  • Mathematica
    Nest[Function[list,
      Module[{p = Prime[Length[list] + 1]},
       Append[list,
        Max[(list[[PrimePi[First[#]]]]) & /@ FactorInteger[p - 1]] +
         1]]], {0}, 110]
  • PARI
    a(n) = my(iteration = 0, v = [prime(n)], v_new); while(v!=[2], v_new = []; for(i=1, #v, v_new = concat(v_new, factor(v[i]-1)[,1]~)); v = Set(v_new); iteration++); iteration \\ Jianing Song, Apr 28 2024
    
  • PARI
    A364332_first_N_terms(N) = my(v = vector(N), f); for(n=2, N, f = factor(prime(n)-1)[,1]~; v[n] = vecmax(vector(#f, i, v[primepi(f[i])]))+1); v \\ Jianing Song, Apr 28 2024

Formula

f(2) = 0 and f(p) = max{f(q):q is prime and q|(p-1)}+1 for p an odd prime. Then a(n) = f(prime(n)).
a(n) = 0 if and only if n = 1. a(n) = 1 if and only if prime(n) is a Fermat prime (A019434). a(n) = 2 if and only if prime(n) - 1 is a product of a power of 2 and a nonempty product of powers of Fermat primes. - Jianing Song, Apr 28 2024

A130790 Number of nodes in the Lucas-Pratt primality tree rooted at prime(n).

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 1, 2, 3, 3, 3, 2, 2, 4, 4, 3, 4, 3, 4, 4, 2, 4, 3, 3, 2, 2, 3, 4, 2, 3, 4, 4, 2, 5, 3, 3, 4, 2, 4, 5, 4, 3, 4, 2, 3, 4, 5, 4, 4, 4, 4, 4, 3, 2, 1, 5, 5, 3, 5, 4, 6, 3, 3, 5, 4, 5, 5, 4, 6, 5, 3, 5, 5, 5, 4, 5, 3, 4, 2, 3, 5, 5, 6, 2, 4, 4, 3, 4, 5, 6, 5, 5, 2, 4, 5, 3, 5, 4, 5, 3
Offset: 1

Views

Author

R. J. Mathar, Jul 15 2007, Mar 07 2008

Keywords

Comments

The primality tree starts at an odd prime at the root node. The branches of each node are the odd primes that divide the value of (the node minus 1). The length of the longest branch is related to A126805. Following the branch with the largest label gives A083647.

Crossrefs

Cf. A037231 (primes which set a new record).

Programs

  • PARI
    LP(p) = my(f=factor(p-1)); if(p <= 2, 0, 1+vecsum(vector(#f~, k, LP(f[k,1]))));
    a(n) = LP(prime(n)); \\ Daniel Suteu, Nov 03 2019
Showing 1-3 of 3 results.