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

A340394 Base-independent home primes: the prime that is finally reached when you treat the prime factors of n in ascending order as digits of a number in base "greatest prime factor + 1" and repeat this until a prime is reached (a(n) = -1 if no prime is ever reached).

Original entry on oeis.org

2, 3, 41, 5, 11, 7, 41, 23, 17, 11, 43, 13, 23, 23, 3407, 17, 47, 19, 89, 31, 47, 23, 1279, 47, 41, 223, 151, 29, 167, 31, 431, 47, 53, 47, 367, 37, 59, 71, 521, 41, 263, 43, 359, 131, 71, 47, 683, 223, 107, 71, 433, 53, 191, 71, 11807, 79, 89, 59, 3023, 61, 167, 223
Offset: 2

Views

Author

S. Brunner, Jan 06 2021

Keywords

Comments

After a prime is reached it repeats itself infinitely. That's why this prime is then called the "home prime": it is the end of the calculation chain for a specific number.

Examples

			For n=4 we get the base-independent home prime 41 through this chain of calculations:
4 = 2 * 2 -> 22_3 (base 3 because 3 = greatest prime factor (2) + 1)
22_3 = 8_10 = 2 * 2 * 2 -> 222_3
222_3 = 26_10 = 2 * 13 -> 2D_14
2D_14 = 41_10, which is a prime. This gives us 41 as our home prime for n = 4, 8, 26 and 41.
		

Crossrefs

Cf. A037274 (home primes).
Cf. A340393.

Programs

  • Maple
    b:= n-> (l-> (m-> add(l[-i]*m^(i-1), i=1..nops(l)))(1+
        max(l)))(map(i-> i[1]$i[2], sort(ifactors(n)[2]))):
    a:= n-> `if`(isprime(n), n, a(b(n))):
    seq(a(n), n=2..77);  # Alois P. Heinz, Jan 09 2021
  • PARI
    f(n) = my(f=factor(n), list=List()); for (k=1, #f~, for (j=1, f[k, 2], listput(list, f[k, 1]))); fromdigits(Vec(list), vecmax(f[, 1])+1); \\ A340393
    a(n) = my(p); while (! isprime(p = f(n)), n = p); p; \\ Michel Marcus, Jan 07 2021
Showing 1-1 of 1 results.