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-2 of 2 results.

A095402 Sum of digits of all distinct prime factors of n.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 2, 5, 4, 9, 8, 2, 8, 5, 10, 7, 10, 4, 5, 5, 5, 6, 3, 9, 11, 10, 4, 2, 5, 10, 12, 5, 10, 12, 7, 7, 5, 12, 7, 4, 8, 7, 11, 5, 7, 7, 11, 6, 8, 5, 7, 9, 13, 13, 14, 10, 7, 6, 10, 2, 9, 7, 13, 10, 8, 14, 8, 5, 10, 12, 8, 12, 9, 9, 16, 7, 3, 7, 11, 12, 13, 9, 14, 4, 17, 10
Offset: 1

Views

Author

Labos Elemer, Jun 21 2004

Keywords

Examples

			n = 1000: prime set = {2, 5}, a[1000] = 7;
n = 255255: prime set={3, 5, 7, 11, 13, 17}, a[255255]= 3+5+7+2+4+8 = 29.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] :=Flatten[FactorInteger[x]] lf[x_] :=Length[FactorInteger[x]] ba[x_] :=Table[Part[ffi[x], 2*j-1], {j, 1, lf[x]}] sd[x_] :=Apply[Plus, IntegerDigits[x]] tdp[x_] :=Flatten[Table[IntegerDigits[Part[ba[x], j]], {j, 1, lf[x]}], 1] sdp[x_] :=Apply[Plus, tdp[x]] Table[sdp[w], {w, 1, 150}]
    Table[Total[Flatten[IntegerDigits[First/@FactorInteger[n]]]],{n,1,100}] (Zak Seidov)
  • Python
    from sympy import factorint
    def a(n): return sum(sum(map(int, str(p))) for p in factorint(n))
    print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Dec 12 2023

A080592 My school teacher gave it to me as a challenge. But he died last week and I do not have the answer.

Original entry on oeis.org

66, 63, 57, 95
Offset: 1

Views

Author

DexXx (dexx(AT)pop.com.br), Feb 22 2003

Keywords

Comments

From Rick L. Shepherd, Jun 28 2008: (Start)
The next (and last) term may be 79. Add the distinct digits used in each prime factor of the prime factorization (ignoring exponents) to get these sums: 6, 10, 13, 15, 16 (i.e., A141346(a(n))).
For example, 66 = 2*3*11 --> {1,2,3} --> 1+2+3=6. Observe that (*) A141346(a(n+1)) = A141346(a(n)) - n + 5. There are an infinite number of k such that A141346(k) = a(n) above, so what pattern selects specifically these?
Take a(1) = 66 arbitrarily (or maybe because this is the smallest composite repdigit number ddd... (A010785) such that A141346(ddd...)=d [and d is, well, *the* "perfect number" (A000396(1)) with which to start]).
Then for n >= 2 a(n+1) is, whenever possible, the largest positive integer less than a(n) such that (*) and otherwise the smallest integer greater than a(n) such that (*). (This pattern could actually be continued through a(11) without modification but then A141346(a(12)) would have the impossible requirement to be -5.
Also problematic is that A141346(a(6)) would be 16 also so the question arises whether to use < or <= above.) On the other hand, from such few terms this pattern is quite possibly just a coincidence -- the intended pattern may be something entirely different (and may depend upon knowing information beyond the numbers themselves such as numerical scores on tests, atomic numbers, ASCII codes, keypad configurations, languages, etc.). (End)

Crossrefs

Cf. A141346.

Formula

One possible formula: For n = 1..4, a(n) = 60 + (((-n^2+n+4)/2) + 9*floor(n/4))*(3+4*floor(n/4)). - Wesley Ivan Hurt, Jan 03 2013
Showing 1-2 of 2 results.