cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A362062 First index in A362061 where A001221(A362061(a(n))) = n.

This page as a plain text file.
%I A362062 #17 Apr 07 2023 10:51:45
%S A362062 1,3,10,52,398,4734,78428,1326821,26386288,645482585
%N A362062 First index in A362061 where A001221(A362061(a(n))) = n.
%o A362062 (Python)
%o A362062 from sympy import primefactors
%o A362062 from collections import Counter
%o A362062 from itertools import count, islice
%o A362062 def agen(): # generator of terms
%o A362062     an, c, d, d2, k = 1, Counter(), dict(), dict(), 0
%o A362062     for n in count(1):
%o A362062         if an in d: dpf = d[an]
%o A362062         else: dpf, d2[dpf] = len(primefactors(an)), n
%o A362062         c[dpf] += 1
%o A362062         an = c[dpf]
%o A362062         if k in d2: yield d2[k]; k += 1
%o A362062 print(list(islice(agen(), 7))) # _Michael S. Branicky_, Apr 06 2023
%o A362062 (Python)
%o A362062 from itertools import count
%o A362062 from sympy import primenu
%o A362062 def A362062(n):
%o A362062     a, b, c = {}, {}, 1
%o A362062     for m in count(1):
%o A362062         d = b[c] = b.get(c,primenu(c))
%o A362062         if d == n: return m
%o A362062         c = a[d] = a.get(d,0)+1 # _Chai Wah Wu_, Apr 07 2023
%Y A362062 Cf. A362061, A001221.
%K A362062 nonn,more
%O A362062 0,2
%A A362062 _Scott R. Shannon_, Apr 06 2023
%E A362062 a(9) from _Chai Wah Wu_, Apr 07 2023