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 A249053 #11 Nov 01 2014 06:07:15 %S A249053 1,2,4,5,6,8,11,12,13,14,17,18,20,23,24,25,26,29,30,31,32,37,38,41,42, %T A249053 44,45,47,48,53,54,55,59,60,62,63,67,68,71,72,73,74,79,80,81,82,83,84, %U A249053 89,90,97,98,101,102,104,105,106,108,109,110,113,114,115 %N A249053 Defined by (i) a(1)=1; (ii) if you move a(n) steps to the right you must reach a prime; (iii) a(n) = smallest unused composite number greater than a(n-1), unless a(n) is required to be prime by (ii), in which case a(n) is the smallest unused prime greater than a(n-1). %D A249053 Eric Angelini, Posting to Sequence Fans Mailing List, Mar 17 2008 (the definition was clarified by Gabriel Cunningham). %H A249053 Reinhard Zumkeller, <a href="/A249053/b249053.txt">Table of n, a(n) for n = 1..10000</a> %o A249053 (Haskell) %o A249053 import Data.Map (singleton, findMin, delete, insert) %o A249053 a249053 n = a249053_list !! (n-1) %o A249053 a249053_list = 1 : f 1 1 a002808_list (singleton 1 1) where %o A249053 f x z cs m %o A249053 | k == x = p : f (x + 1) p cs (insert (x + p) 0 $ delete x m) %o A249053 | otherwise = c : f (x + 1) c cs' (insert (x + c) 0 m) %o A249053 where p = a007918 z %o A249053 (c:cs') = dropWhile (<= z) cs %o A249053 (k,_) = findMin m %o A249053 -- _Reinhard Zumkeller_, Nov 01 2014 %Y A249053 See A249054 for another version. %Y A249053 Cf. A002808, A007918. %K A249053 nonn %O A249053 1,2 %A A249053 _N. J. A. Sloane_, Nov 01 2014