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 A322870 #6 Dec 30 2018 00:05:23 %S A322870 1,1,1,2,1,1,1,2,2,1,1,3,1,1,2,1,1,1,1,3,2,1,1,3,1,1,2,1,1,1,1,2,2,1, %T A322870 2,3,1,1,3,3,1,1,1,2,1,1,1,2,2,1,1,2,1,1,2,4,3,1,1,4,1,1,1,1,1,1,1,1, %U A322870 2,1,1,3,1,1,2,1,2,1,1,2,3,1,1,4,2,1,2,1,1,1,5,2,1,1,2,2,1,1,1,3,1,1,1,3,2 %N A322870 Ordinal transform of A302043. %H A322870 Antti Karttunen, <a href="/A322870/b322870.txt">Table of n, a(n) for n = 1..65537</a> %o A322870 (PARI) %o A322870 up_to = 1024; %o A322870 ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; }; %o A322870 A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639 %o A322870 v078898 = ordinal_transform(vector(up_to,n,A020639(n))); %o A322870 A078898(n) = v078898[n]; %o A322870 A302042(n) = if((1==n)||isprime(n),1,my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p),d -= 1)); (k*p)); %o A322870 A302043(n) = (n - A302042(n)); %o A322870 v322870 = ordinal_transform(vector(up_to,n,A302043(n))); %o A322870 A322870(n) = v322870[n]; %Y A322870 Cf. A078898, A302042, A302043, A322871. %K A322870 nonn %O A322870 1,4 %A A322870 _Antti Karttunen_, Dec 29 2018