|
|
A370356
|
|
a(n) is the smallest number such that exactly n numbers k exist with k - a(n) = sopfr(k) + sopfr(a(n)), where sopfr(m) is the sum of the primes dividing m with repetition.
|
|
1
|
|
|
4, 1, 6, 22, 46, 526, 1509, 838, 6238, 5667, 20158, 32127, 56697, 82617, 177598, 174718, 384382, 314492, 415789, 498957, 1142398, 1884958, 1713598, 2620798, 2280067, 5209342, 4324316, 5847653, 7796863, 16516489, 6918908, 9979197, 15855829, 24023995, 31600797
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|