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 A124218 #15 Mar 30 2021 17:38:55 %S A124218 1,1,2,1,2,5,2,7,4,9,2,5,2,9,7,9,2,17,2,13,5,7,2,23,3,7,5,13,2,29,2, %T A124218 11,5,7,4,25,2,7,5,19,2,25,2,13,11,7,2,29,3,13,5,11,2,23,4,17,5,7,2, %U A124218 43,2,7,10,13,4,25,2,11,5,23,2,35,2,7,11,11,4,25,2,23,7,7,2,41,4,7,5,17,2,43,4 %N A124218 a(n) is the m-th positive integer which is coprime to n, where phi(n) is number of positive integers which are <= n and are coprime to n, d(n) is the number of positive divisors of n and m = phi(n) if phi(n)|d(n), else m = d(n) mod phi(n). %H A124218 Antti Karttunen, <a href="/A124218/b124218.txt">Table of n, a(n) for n = 1..16384</a> %t A124218 f[n_] := Block[{k = 0, m = Mod[Length[Divisors[n]], EulerPhi[n], 1]},While[m > 0,k++;While[GCD[n, k] > 1, k++ ];m--;];k];Table[f[n], {n, 100}] (* _Ray Chandler_, Oct 26 2006 *) %o A124218 (PARI) A124218(n) = { my(d=numdiv(n), t=eulerphi(n), m=if(!(d%t), t, (d%t))); for(k=1,oo,if(1==gcd(k,n), m--; if(!m, return(k)))); }; \\ _Antti Karttunen_, Mar 30 2021 %Y A124218 Cf. A000005, A000010, A124219, A124330. %K A124218 nonn %O A124218 1,3 %A A124218 _Leroy Quet_, Oct 19 2006 %E A124218 Edited and extended by _Ray Chandler_, Oct 26 2006