cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A141346 Sum of the distinct digits of the prime factors of n.

Original entry on oeis.org

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

Views

Author

Rick L. Shepherd, Jun 26 2008

Keywords

Comments

Motivated by seeking an explanation for A080592. For n >= 2, 1 <= a(n) <= 45. For n >= 1, a(n) <= A095402(n).

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).
		

Crossrefs

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
Showing 1-1 of 1 results.