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 A304106 #12 Dec 21 2021 10:15:26 %S A304106 1,2,3,1,4,2,5,3,1,1,6,4,7,5,2,2,8,6,9,7,3,3,10,8,4,4,1,1,11,9,12,10, %T A304106 5,5,2,2,13,11,6,6,14,12,15,13,7,7,16,14,8,8,3,3,17,15,9,9,4,4,18,16, %U A304106 19,17,10,10,5,5,20,18,11,11,21,19,22,20,12,12,6,6,23,21,13,13,24,22,14,14,7,7,25,23,15,15,8,8,1,1,26,24,16,16 %N A304106 Ordinal transform of A175851. %C A304106 Ordinal transform of the ordinal transform of the nextprime function, A151800(1..) = 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, ... %H A304106 Antti Karttunen, <a href="/A304106/b304106.txt">Table of n, a(n) for n = 1..65537</a> %F A304106 For all n >= 1, a(A008578(n)) = n. %t A304106 A175851[n_] := If[!CompositeQ[n], 1, n - NextPrime[n, -1] + 1]; %t A304106 b[_] = 0; %t A304106 a[n_] := a[n] = With[{t = A175851[n]}, b[t] = b[t] + 1]; %t A304106 Array[a, 105] (* _Jean-François Alcover_, Dec 21 2021 *) %o A304106 (PARI) %o A304106 up_to = 65537; %o A304106 A151800(n) = nextprime(1+n); %o A304106 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 A304106 v304106 = ordinal_transform(ordinal_transform(vector(up_to,n,A151800(n)))); %o A304106 A304106(n) = v304106[n]; %Y A304106 Cf. A008578, A151800, A175851. %K A304106 nonn %O A304106 1,2 %A A304106 _Antti Karttunen_, Jun 09 2018