A340393 Treat the prime factors of n in ascending order as digits of a number in base "greatest prime factor + 1" and convert this number back to a decimal number.
2, 3, 8, 5, 11, 7, 26, 15, 17, 11, 43, 13, 23, 23, 80, 17, 47, 19, 89, 31, 35, 23, 171, 35, 41, 63, 151, 29, 95, 31, 242, 47, 53, 47, 175, 37, 59, 55, 521, 41, 159, 43, 323, 131, 71, 47, 683, 63, 107, 71, 433, 53, 191, 71, 1175, 79, 89, 59, 527, 61, 95, 223, 728
Offset: 2
Examples
Some examples for the calculation of a(n): (For digits 10,11...36 the letters A,B...Z are used.) n -> prime factors -> a(n)(base) -> a(n)(base 10) 6 -> 2 * 3 -> 23 (4) -> 11 20 -> 2 * 2 * 5 -> 225 (6) -> 89 33 -> 3 * 11 -> 3B (12) -> 47 56 -> 2 * 2 * 2 * 7 -> 2227 (8) -> 1175 62 -> 2 * 31 -> 2U (32) -> 95 72 -> 2 * 2 * 2 * 3 * 3 ->22233 (4) -> 687 100 -> 2 * 2 * 5 * 5 -> 2255 (6) -> 539 910 -> 2 * 5 * 7 * 13 -> 257D (14) -> 6579
Links
- Alois P. Heinz, Table of n, a(n) for n = 2..20000
Programs
-
Maple
a:= 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]))): seq(a(n), n=2..77); # Alois P. Heinz, Jan 09 2021
-
PARI
a(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); \\ Michel Marcus, Jan 06 2021
-
Python
def A(startn,lastn=0): a,n,lastn=[],startn,max(lastn,startn) while n<=lastn: i,j,v,m,f=2,0,0,n,[] while i
-
Python
from sympy import factorint def fromdigits(d, b): n = 0 for di in d: n *= b; n += di return n def a(n): f = sorted(factorint(n, multiple=True)) return fromdigits(f, f[-1]+1) print([a(n) for n in range(2, 76)]) # Michael S. Branicky, Jan 06 2021
Formula
a(p) = p for prime p.