A071785 In prime factorization of n replace each prime with the sum of its decimal digits.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 12, 4, 14, 15, 16, 8, 18, 10, 20, 21, 4, 5, 24, 25, 8, 27, 28, 11, 30, 4, 32, 6, 16, 35, 36, 10, 20, 12, 40, 5, 42, 7, 8, 45, 10, 11, 48, 49, 50, 24, 16, 8, 54, 10, 56, 30, 22, 14, 60, 7, 8, 63, 64, 20, 12, 13, 32, 15, 70, 8, 72
Offset: 1
Examples
a(143) = a(11*13) = a(11)*a(13) = (1+1)*(1+3) = 2*4 = 8.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
Programs
-
Maple
a:= n-> mul(add(j, j=convert(i[1], base, 10))^i[2], i=ifactors(n)[2]): seq(a(n), n=1..72); # Alois P. Heinz, Oct 22 2021
-
Mathematica
a[n_] := Product[{p, e} = pe; Total[IntegerDigits[p]]^e, {pe, FactorInteger[n]}]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 22 2021 *)
-
PARI
a(n, base=10) = my (f=factor(n)); prod(i=1, #f~, sumdigits(f[i,1], base)^f[i,2]) \\ Rémy Sigrist, Feb 19 2019