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 A051884 #29 Jul 02 2025 16:01:58 %S A051884 1,4,9,10,21,22,25,26,27,28,33,34,35,36,49,50,51,52,55,56,57,58,63,64, %T A051884 65,66,85,86,87,88,91,92,93,94,95,96,115,116,117,118,119,120,121,122, %U A051884 123,124,125,126,143,144,145,146,147,148,153,154,155,156,161,162,169 %N A051884 Smallest number larger than the previous term which is not a prime but is relatively prime to the previous term. %H A051884 T. D. Noe, <a href="/A051884/b051884.txt">Table of n, a(n) for n=1..1000</a> %H A051884 A. Murthy, <a href="http://www.gallup.unm.edu/~smarandache/SN/ScArt5/ExploringNewIdeas.pdf">Exploring some new ideas on Smarandache type sets, functions and sequences</a>, Smarandache Notions Journal Vol. 11 N. 1-2-3 Spring 2000. %p A051884 with(numtheory); i:=4; k:=5; while(k < 100) do while(order(k, i) = FAIL or isprime(k)) do k:=k+1; end do; print(k); i:= k; k:=k+1; end do; # _Ben Paul Thurston_, Feb 08 2007 %t A051884 rPrimeNext[n_]:=Module[{k},k=n+1;While[PrimeQ[k]||GCD[n,k]!=1,k++ ];k]; a=1;lst={a};Do[AppendTo[lst,a=rPrimeNext[a]],{n,0,5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, May 15 2010 *) %t A051884 nxt[n_]:=Module[{k=n+1},While[PrimeQ[k]||!CoprimeQ[k,n],k++];k]; NestList[ nxt,1,60] (* _Harvey P. Dale_, Mar 12 2013 *) %o A051884 (Haskell) %o A051884 a051884 n = a051884_list !! (n-1) %o A051884 a051884_list = 1 : f 1 a002808_list where %o A051884 f x cs = y : f y (dropWhile (<= y) cs) where %o A051884 y = head [z | z <- cs, x `gcd` z == 1] %o A051884 -- _Reinhard Zumkeller_, Jun 03 2013 %Y A051884 Sequences with related definitions: A072525, A085084, A126638, A131368, A163643. %Y A051884 Cf. A002808. %K A051884 nonn,nice,easy %O A051884 1,2 %A A051884 _Felice Russo_, Dec 15 1999 %E A051884 More terms from _James Sellers_, Dec 16 1999 %E A051884 Definition corrected by _Franklin T. Adams-Watters_, Sep 19 2006