login
A380654
Number of positive integers less than or equal to n that have the same sum of distinct prime factors as n.
2
1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 1, 1, 4, 1, 4, 1, 3, 1, 2, 1, 5, 6, 1, 3, 2, 1, 2, 1, 5, 1, 2, 1, 7, 1, 1, 1, 4, 1, 2, 1, 3, 2, 1, 1, 8, 5, 6, 1, 2, 1, 9, 2, 3, 1, 2, 1, 3, 1, 1, 4, 6, 1, 3, 1, 3, 1, 2, 1, 10, 1, 1, 3, 2, 2, 3, 1, 7, 4, 2, 1, 3, 2, 1, 1, 4, 1, 5, 2, 2, 1, 1, 1, 11, 1, 4, 3, 8
OFFSET
1,4
COMMENTS
Ordinal transform of A008472.
LINKS
Eric Weisstein's World of Mathematics, Sum of Prime Factors.
FORMULA
a(n) = |{j <= n : sopf(j) = sopf(n)}|.
MAPLE
b:= n-> add(i[1], 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
sopf[n_] := DivisorSum[n, # &, PrimeQ[#] &]; Table[Length[Select[Range[n], sopf[#] == sopf[n] &]], {n, 1, 100}]
PROG
(Python)
from sympy import factorint
from collections import Counter
from itertools import count, islice
def agen(): # generator of terms
sopfcount = Counter()
for n in count(1):
key = sum(p for p in factorint(n))
sopfcount[key] += 1
yield sopfcount[key]
print(list(islice(agen(), 100))) # Michael S. Branicky, Jan 30 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 29 2025
STATUS
approved