login
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
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,1
LINKS
FORMULA
a(p) = p for prime p.
EXAMPLE
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
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
PROG
(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<m**(0.5)+0.1:
if m//i==m/i:
f.append(i)
m, i=m//i, 1
i+=1
f.append(m)
while j<len(f):v, j=v+f[j]*((f[len(f)-1]+1)**(len(f)-j-1)), j+1
print(str(n)+" "+str(v))
a.append([v])
n+=1
return a
(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
(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
CROSSREFS
Cf. A037274 (home primes), A037276, A340394.
Sequence in context: A011433 A349824 A332221 * A332222 A126139 A296070
KEYWORD
nonn,look,base
AUTHOR
S. Brunner, Jan 06 2021
STATUS
approved