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

A384512 Record terms in A384698.

Original entry on oeis.org

2, 3, 13, 17, 37, 41, 61, 613, 829, 1861, 2269, 7333, 35149, 1008229, 909889549, 1423665384101, 10341624100573, 440171836495742615578609, 471206109194322691633610979351605854911441181, 4466501842784976704198682186832272945270823914876207595593007001786562643495541
Offset: 1

Views

Author

Ya-Ping Lu, May 31 2025

Keywords

Examples

			41 is a term because iterating the map on 12 results in a prime in 3 steps: 12 -> 2*12+1=25 -> 25-5=20 -> 2*20+1=41 and 41 is a record prime for starting integers <= 12.
		

Crossrefs

Cf. A020639 (lpf), A383777, A384698.

Programs

  • Python
    from sympy import isprime, primefactors; rec = 1
    for n in range (2, 158163):
        while not isprime(n): n = n - min(primefactors(n)) if n%2 else 2*n + 1
        if n > rec: rec = n; print(n, end = ', ')

Formula

a(n) mod 4 = 1, n > 2.

A384874 a(n) is the first prime encountered when iterating the map x -> x/2 if x is even, x*lpf(x) + 1 otherwise, where lpf(x) is the least prime factor of x, on n >= 2; or -1 if a prime is never reached.

Original entry on oeis.org

2, 3, 2, 5, 3, 7, 2, 7, 5, 11, 3, 13, 7, 23, 2, 17, 7, 19, 5, 2, 11, 23, 3, 313, 13, 41, 7, 29, 23, 31, 2, 313, 17, 11, 7, 37, 19, 59, 5, 41, 2, 43, 11, 17, 23, 47, 3, 43, 313, 5869, 13, 53, 41, 13, 7, 43, 29, 59, 23, 61, 31, 313, 2, 163, 313, 67, 17, 13, 11
Offset: 2

Views

Author

Ya-Ping Lu, Jun 11 2025

Keywords

Comments

Conjecture: a(n) != -1.
For n <= 24, this sequence is the same as A320028.

Crossrefs

Programs

  • Python
    from sympy import isprime, primefactors
    def A384874(n):
        while not isprime(n): n = n*min(primefactors(n))+1 if n%2 else n//2
        return n
Showing 1-2 of 2 results.