|
|
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).
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
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))):
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|