login
A380653
Number of positive integers less than or equal to n that have the same sum of prime factors (with repetition) as n.
3
1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 3, 1, 1, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 2, 1, 4, 2, 1, 3, 1, 4, 1, 2, 1, 5, 1, 1, 1, 3, 1, 2, 1, 2, 4, 1, 1, 5, 2, 3, 1, 2, 1, 6, 2, 3, 1, 2, 1, 4, 1, 1, 4, 5, 1, 3, 1, 2, 1, 3, 1, 6, 1, 1, 5, 2, 2, 3, 1, 6, 7, 2, 1, 4, 2, 1, 1, 3, 1, 7, 2, 1, 1, 1, 1, 8, 1, 4, 4, 5
OFFSET
1,6
COMMENTS
Ordinal transform of A001414.
LINKS
Eric Weisstein's World of Mathematics, Sum of Prime Factors.
FORMULA
a(n) = |{j <= n : sopfr(j) = sopfr(n)}|.
MAPLE
b:= n-> add(i[1]*i[2], i=ifactors(n)[2]):
p:= proc() 0 end:
a:= proc(n) option remember; local t;
t:= b(n); p(t):= p(t)+1
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jan 30 2025
MATHEMATICA
sopfr[1] = 0; sopfr[n_] := Plus @@ Times @@@ FactorInteger@ n; Table[Length[Select[Range[n], sopfr[#] == sopfr[n] &]], {n, 1, 100}]
PROG
(Python)
from sympy import factorint
from collections import Counter
from itertools import count, islice
def agen(): # generator of terms
sopfrcount = Counter()
for n in count(1):
key = sum(p*e for p, e in factorint(n).items())
sopfrcount[key] += 1
yield sopfrcount[key]
print(list(islice(agen(), 100))) # Michael S. Branicky, Jan 30 2025
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Ilya Gutkovskiy, Jan 29 2025
STATUS
approved