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 A366291 #9 Oct 06 2023 17:48:43 %S A366291 1,1,1,2,1,3,1,4,3,5,1,6,1,7,5,8,1,9,1,2,7,10,1,4,5,11,9,2,1,12,1,13, %T A366291 10,14,7,15,1,16,11,4,1,7,1,2,12,17,1,8,7,18,14,2,1,9,10,4,16,19,1,20, %U A366291 1,21,3,22,11,23,1,2,17,24,1,25,1,26,18,2,10,27,1,8,28,29,1,30,14,31,19,4,1,32,11,2,21,33,16 %N A366291 Lexicographically earliest infinite sequence such that a(i) = a(j) => A353271(i) = A353271(j) for all i, j >= 1, where A353271(n) is the numerator of n / A005940(1+(3*A156552(n))). %C A366291 Restricted growth sequence transform of A353271. %C A366291 For all i, j: A305800(i) = A305800(j) => a(i) = a(j). %H A366291 Antti Karttunen, <a href="/A366291/b366291.txt">Table of n, a(n) for n = 1..65537</a> %H A366291 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %o A366291 (PARI) %o A366291 up_to = 65537; %o A366291 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 A366291 (PARI) %o A366291 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); }; %o A366291 A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res }; %o A366291 A332449(n) = A005940(1+(3*A156552(n))); %o A366291 A353271(n) = (n / gcd(n, A332449(n))); %o A366291 v366291 = rgs_transform(vector(up_to,n,A353271(n))); %o A366291 A366291(n) = v366291[n]; %Y A366291 Cf. A005940, A156552, A305800, A332449, A353271. %Y A366291 Cf. also A365431. %K A366291 nonn %O A366291 1,4 %A A366291 _Antti Karttunen_, Oct 06 2023