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 A323082 #11 Jan 04 2019 17:37:55 %S A323082 1,2,3,4,3,5,3,4,6,7,3,8,3,9,10,11,3,6,3,12,13,14,3,8,15,16,17,18,3, %T A323082 10,3,11,19,20,21,22,3,23,24,12,3,13,3,25,26,27,3,28,29,15,30,31,3,17, %U A323082 32,18,33,34,3,35,3,36,37,38,39,19,3,40,41,21,3,22,3,42,43,44,45,24,3,46,47,48,3,49,50,51,52,25,3,26,53,54,55,56,57,28,3,29,58,59,3,30,3,31 %N A323082 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -(n mod 2) if n is a prime, and f(n) = A300840(n) for any other number. %C A323082 For all i, j: A323074(i) = A323074(j) => a(i) = a(j). %C A323082 Like the related A322822 also this filter sequence satisfies the following two implications, for all i, j >= 1: %C A323082 a(i) = a(j) => A322356(i) = A322356(j), %C A323082 a(i) = a(j) => A290105(i) = A290105(j). %H A323082 Antti Karttunen, <a href="/A323082/b323082.txt">Table of n, a(n) for n = 1..65539</a> %o A323082 (PARI) %o A323082 up_to = 65537; %o A323082 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 A323082 ispow2(n) = (n && !bitand(n,n-1)); %o A323082 A302777(n) = ispow2(isprimepower(n)); %o A323082 A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); }; %o A323082 v050376 = A050376list(up_to); %o A323082 A050376(n) = v050376[n]; %o A323082 A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); }; %o A323082 A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&A302777(n/d), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); }; %o A323082 A300840(n) = A052330(A052331(n)>>1); %o A323082 A323082aux(n) = if(isprime(n),-(n%2),A300840(n)); %o A323082 v323082 = rgs_transform(vector(up_to,n,A323082aux(n))); %o A323082 A323082(n) = v323082[n]; %Y A323082 Cf. A052330, A300840, A305801, A322822, A323074. %Y A323082 Cf. also A290105, A322356. %K A323082 nonn %O A323082 1,2 %A A323082 _Antti Karttunen_, Jan 04 2019