login
A362062
First index in A362061 where A001221(A362061(a(n))) = n.
2
1, 3, 10, 52, 398, 4734, 78428, 1326821, 26386288, 645482585
OFFSET
0,2
PROG
(Python)
from sympy import primefactors
from collections import Counter
from itertools import count, islice
def agen(): # generator of terms
an, c, d, d2, k = 1, Counter(), dict(), dict(), 0
for n in count(1):
if an in d: dpf = d[an]
else: dpf, d2[dpf] = len(primefactors(an)), n
c[dpf] += 1
an = c[dpf]
if k in d2: yield d2[k]; k += 1
print(list(islice(agen(), 7))) # Michael S. Branicky, Apr 06 2023
(Python)
from itertools import count
from sympy import primenu
def A362062(n):
a, b, c = {}, {}, 1
for m in count(1):
d = b[c] = b.get(c, primenu(c))
if d == n: return m
c = a[d] = a.get(d, 0)+1 # Chai Wah Wu, Apr 07 2023
CROSSREFS
Sequence in context: A309885 A363209 A052446 * A373284 A290489 A002873
KEYWORD
nonn,more
AUTHOR
Scott R. Shannon, Apr 06 2023
EXTENSIONS
a(9) from Chai Wah Wu, Apr 07 2023
STATUS
approved