OFFSET
1,3
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..51
EXAMPLE
a(1) = a(2) = 1 as 1 is the smallest number to have two numbers (k = 1, 6) such that 1 - 1 = 0 = sopfr(1) + sopfr(1) = 0, and 6 - 1 = 5 = sopfr(6) + sopfr(1) = 5 + 0 = 5.
a(3) = 6 as 6 is the smallest number to have three numbers (k = 20, 21, 26) such that 20 - 6 = 14 = sopfr(20) + sopfr(6) = 9 + 5 = 14, 21 - 6 = 15 = sopfr(21) + sopfr(6) = 10 + 5 = 15, and 26 - 6 = 20 = sopfr(26) + sopfr(6) = 15 + 5 = 20.
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
for i in range(n, v+1): yield m; n += 1
print(list(islice(agen(), 16))) # Michael S. Branicky, Feb 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Feb 16 2024
EXTENSIONS
a(21) and beyond from Michael S. Branicky, Feb 16 2024
STATUS
approved