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 A251558 #31 May 09 2021 02:28:40 %S A251558 9,9,9,9,15,15,21,21,21,21,21,21,21,21,21,21,27,27,33,33,33,33,33,45, %T A251558 45,49,49,49,49,49,49,49,49,49,49,49,49,49,49,57,57,57,57,57,57,57,69, %U A251558 69,75,75,75,75,75,75,77,77,77,77,77,77,77,77,77,77,77,77,77,105,105,105 %N A251558 a(n) = smallest odd number not in {A098550(1), A098550(2), ..., A098550(n)} which is neither a prime nor a term of A251542. %H A251558 Reinhard Zumkeller, <a href="/A251558/b251558.txt">Table of n, a(n) for n = 1..10000</a> %H A251558 David L. Applegate, Hans Havermann, Bob Selcoe, Vladimir Shevelev, N. J. A. Sloane, and Reinhard Zumkeller, <a href="http://arxiv.org/abs/1501.01669">The Yellowstone Permutation</a>, arXiv preprint arXiv:1501.01669 [math.NT], 2015 and <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Sloane/sloane9.html">J. Int. Seq. 18 (2015) 15.6.7</a>. %t A251558 terms = 70; max = 2 terms; %t A251558 f[lst_] := Block[{k = 4}, While[GCD[lst[[-2]], k] == 1 || GCD[lst[[-1]], k] > 1 || MemberQ[lst, k], k++]; Append[lst, k]]; %t A251558 A098550 = Nest[f, {1, 2, 3}, max-3]; %t A251558 sel = Select[Transpose[{Range[max], A098550}], PrimeQ[#[[2]]]&][[All,1]]+2; %t A251558 A251542 = A098550[[sel]]/A098550[[sel-2]] ; %t A251558 a[n_] := For[k = 1, k <= max, k = k+2, If[CompositeQ[k] && FreeQ[A098550[[1 ;; n]], k] && FreeQ[A251542, k], Return[k]]]; %t A251558 Table[a[n], {n, 1, terms}] (* _Jean-François Alcover_, Dec 06 2018, after _Robert G. Wilson v_ in A098550 *) %o A251558 (Haskell) %o A251558 import Data.List (delete); import Data.List.Ordered (minus) %o A251558 a251558 n = a251558_list !! (n-1) %o A251558 a251558_list = 9 : 9 : 9 : f 2 3 [4..] (tail a014076_list) where %o A251558 f u v ws zs = g ws where %o A251558 g (x:xs) = if gcd x u > 1 && gcd x v == 1 %o A251558 then y : f v x (delete x ws) ys else g xs %o A251558 where ys@(y:_) = zs `minus` [x] %o A251558 -- _Reinhard Zumkeller_, Mar 11 2015 %Y A251558 Cf. A098550, A251542, A251546, A251557, A251559. %Y A251558 Cf. A014076. %K A251558 nonn %O A251558 1,1 %A A251558 _N. J. A. Sloane_, Dec 23 2014