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.
%I A339874 #7 Dec 25 2020 19:31:16 %S A339874 1,2,2,3,2,3,2,4,5,3,2,4,2,3,5,6,2,7,2,4,5,3,2,6,8,3,9,4,2,7,2,10,5,3, %T A339874 8,11,2,3,5,6,2,7,2,4,9,3,2,10,12,13,5,4,2,14,8,6,5,3,2,11,2,3,9,15,8, %U A339874 7,2,4,5,13,2,16,2,3,17,4,12,7,2,10,18,3,2,11,8,3,5,6,2,14,12,4,5,3,8,15,2,19,9,20,2,7,2,6,17 %N A339874 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A052126(n) for n > 1, and f(1) = 0. %C A339874 For all i, j: %C A339874 A305800(i) = A305800(j) => a(i) = a(j), %C A339874 a(i) = a(j) => A001222(i) = A001222(j), %C A339874 a(i) = a(j) => A322826(i) = A322826(j). %H A339874 Antti Karttunen, <a href="/A339874/b339874.txt">Table of n, a(n) for n = 1..65537</a> %F A339874 a(1) = 1; for n > 1, a(n) = 1 + A322826(n). %o A339874 (PARI) %o A339874 up_to = 65537; %o A339874 rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; }; %o A339874 A052126(n) = if(1==n,n,(n/vecmax(factor(n)[, 1]))); %o A339874 Aux339874(n) = if(1==n,0,A052126(n)); %o A339874 v339874 = rgs_transform(vector(up_to, n, Aux339874(n))); %o A339874 A339874(n) = v339874[n]; %Y A339874 Cf. A052126, A322826. %Y A339874 Cf. also A305800, A300226, A334107, A334108. %K A339874 nonn %O A339874 1,2 %A A339874 _Antti Karttunen_, Dec 25 2020