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 A328314 #13 Oct 16 2019 13:18:05 %S A328314 1,2,3,4,3,3,5,6,5,3,5,3,7,5,8,3,5,5,9,10,11,5,8,12,9,7,13,5,9,8,13, %T A328314 14,15,5,8,5,16,9,17,7,13,11,18,5,19,8,13,20,21,9,22,5,8,13,13,23,18, %U A328314 9,17,8,24,13,13,11,18,15,17,25,26,8,13,27,13,16,28,9,22,17,29,30,31,13,13,32,33,18,34,9,17,19,13,8,35 %N A328314 Lexicographically earliest infinite sequence such that a(i) = a(j) => A025586(i) = A025586(j) for all i, j. %C A328314 Restricted growth sequence transform of A025586, the largest value in '3x+1' trajectory of n. %H A328314 Antti Karttunen, <a href="/A328314/b328314.txt">Table of n, a(n) for n = 1..65537</a> %H A328314 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %o A328314 (PARI) %o A328314 up_to = 65537; %o A328314 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 A328314 A025586(n) = { my(r=n); while(n>2, if(n%2, n=3*n+1; if(n>r, r=n), n/=2)); (r); }; \\ From A025586 %o A328314 v328314 = rgs_transform(vector(up_to, n, A025586(n))); %o A328314 A328314(n) = v328314[n]; %Y A328314 Cf. A025586. %Y A328314 Cf. also A322973. %K A328314 nonn %O A328314 1,2 %A A328314 _Antti Karttunen_, Oct 14 2019