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 A196189 #10 Feb 22 2013 21:39:05 %S A196189 3,5,7,9,8,11,10,13,14,17,15,19,16,23,22,21,20,25,24,27,26,29,28,31, %T A196189 32,33,34,37,35,41,36,39,38,43,44,47,40,45,46,49,48,53,50,51,52,55,54, %U A196189 59,57,61,56,63,58,65,62,67,64,69,66,71,68,73,74,75,72,79,70,77,76 %N A196189 Smallest number not yet in the sequence greater than n+1 and relatively prime to n. %H A196189 Franklin T. Adams-Watters, <a href="/A196189/b196189.txt">Table of n, a(n) for n = 1..10000</a> %o A196189 (PARI) invecn(v,n,x)=for(k=1,n,if(v[k]==x,return(k)));0 %o A196189 nexta(v,n)=local(k=n+2);while(gcd(k,n)>1||invecn(v,n-1,k),k++);k %o A196189 al(n)=local(v=vector(n));for(k=1,n,v[k]=nexta(v,k));v %o A196189 (Haskell) %o A196189 a196189 n = a196189_list !! (n-1) %o A196189 a196189_list = f 1 [] where %o A196189 f n xs = x : f (n+1) (x:xs) where %o A196189 x = head [z | z <- [n+2..], z `notElem` xs, gcd z n == 1] %o A196189 -- _Reinhard Zumkeller_, Sep 29 2011 %Y A196189 Cf. A169190, A065190 (if condition a(n) > n dropped). %K A196189 nonn %O A196189 1,1 %A A196189 _Franklin T. Adams-Watters_, Sep 28 2011