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 A304748 #6 May 29 2018 20:40:09 %S A304748 1,2,1,2,1,3,4,2,1,2,4,5,1,3,6,2,1,2,1,2,1,5,4,7,8,9,10,5,4,9,6,2,4,2, %T A304748 1,2,6,3,4,2,6,2,8,7,4,3,1,11,12,13,6,13,1,14,6,7,10,5,1,13,4,7,10,2, %U A304748 12,3,1,2,15,3,1,2,1,16,4,5,15,5,4,2,12,7,6,2,10,16,17,11,6,5,1,5,1,18,1,19,8,20,21,22,8,16,10,22,21 %N A304748 Restricted growth sequence transform of A291759(n), formed from 2-digits in ternary representation of A048673(n). %H A304748 Antti Karttunen, <a href="/A304748/b304748.txt">Table of n, a(n) for n = 1..65537</a> %H A304748 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %o A304748 (PARI) %o A304748 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961 %o A304748 A048673(n) = (A003961(n)+1)/2; %o A304748 A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From A289814 %o A304748 A291759(n) = A289814(A048673(n)); %o A304748 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 A304748 v304748 = rgs_transform(vector(65537,n,A291759(n))); %o A304748 A304748(n) = v304748[n]; %Y A304748 Cf. A048673, A289814, A291759. %Y A304748 Cf. also A304746. %K A304748 nonn %O A304748 1,2 %A A304748 _Antti Karttunen_, May 29 2018