OFFSET
1,1
COMMENTS
a(21) and all further terms > 10^9. - Michael S. Branicky, Sep 08 2025
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a247095 = (+ 5) . fromJust . (`elemIndex` a250030_list)
(PARI) A008474(n) = my(f=factor(n)); sum(i=1, #f~, f[i, 1]+f[i, 2]);
a(n) = my(k=5); while(f(k) != n, k++); k; \\ Michel Marcus, Feb 05 2022
(Python)
from itertools import count, islice
from sympy import factorint
def f(n): # A250030
k = 0
while n != 5: n, k = sum(p+e for p, e in factorint(n).items()), k + 1
return k
def agen(): # generator of terms
adict, n = dict(), 1
for k in count(5):
v = f(k)
if v not in adict:
adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 16))) # Michael S. Branicky, Sep 08 2025
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Reinhard Zumkeller, Nov 18 2014
EXTENSIONS
a(17)-a(18) from Michel Marcus, Feb 05 2022
a(4) corrected and a(19)-a(20) from Michael S. Branicky, Sep 08 2025
STATUS
approved
