OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..43
Michael S. Branicky, Terms a(n) <= 10^8 (else -1)
FORMULA
a(n) >= A370352(n).
PROG
(Python)
from sympy import factorint
from itertools import count, islice
from collections import Counter
kcount, kmax = Counter(), 0
def sopfr(n): return sum(p*e for p, e in factorint(n).items())
def f(n):
global kcount, kmax
target = n + sopfr(n)
for k in range(kmax+1, 2*target+5):
kcount[k-sopfr(k)] += 1
kmax += 1
return kcount[target]
def agen(): # generator of terms
adict, n = dict(), 1
for m in count(1):
v = f(m)
if v not in adict: adict[v] = m
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 16)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael S. Branicky, Feb 16 2024
STATUS
approved