A141346 Sum of the distinct digits of the prime factors of n.
0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 1, 5, 4, 9, 8, 2, 8, 5, 10, 7, 10, 3, 5, 5, 5, 6, 3, 9, 11, 10, 4, 2, 4, 10, 12, 5, 10, 12, 4, 7, 5, 12, 7, 3, 8, 5, 11, 5, 7, 7, 11, 6, 8, 5, 6, 9, 13, 11, 14, 10, 7, 6, 10, 2, 9, 6, 13, 10, 5, 14, 8, 5, 10, 12, 8, 12, 8, 6, 16, 7, 3, 7, 11, 12, 13, 9, 14, 3, 17, 10
Offset: 1
Examples
a(44) = 3 as 44 = 2^2 * 11 and the sum of the distinct digits of the prime factors is 1 + 2 (whereas A095402(44) = 4 = 1 + 1 + 2).
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Join[{0},Rest[Total[Union[Flatten[IntegerDigits/@Transpose[ FactorInteger[ #]][[1]]]]]&/@Range[90]]] (* Harvey P. Dale, Nov 30 2011 *)
-
Python
from sympy import factorint def a(n): s = set() for p in factorint(n): s |= set(str(p)) return sum(map(int, s)) print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Dec 12 2023
Comments