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 A056875 #15 Feb 16 2025 08:32:43 %S A056875 1,3,5,6,9,10,11,13,14,18,19,20,21,23,24,27,28,30,33,34,36,38,40,41, %T A056875 42,43,44,46,47,50,51,53,55,58,59,60,62,65,68,69,70,71,73,74,76,79,80, %U A056875 82,83,84,85,88,89,91,92,93,95,96,97,101,102,103,105,106,109,111,113,114 %N A056875 Generated by sieving the natural numbers: keep the smallest remaining number k and take out its k-th successor l as well as the l-th successor m of l, the m-th successor of m and so on. Then start again from the next remaining number. %C A056875 These numbers are homogeneously distributed with a density of approximately 0.59060. %H A056875 Reinhard Zumkeller, <a href="/A056875/b056875.txt">Table of n, a(n) for n = 0..10000</a> %H A056875 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Sieve.html">Sieve</a> %H A056875 Wikipedia, <a href="http://en.wikipedia.org/wiki/Sieve_theory">Sieve theory</a> %H A056875 <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a> %e A056875 In the first round one starts with 1 and the numbers 2,4,8,16,... are removed leaving 1,3,5,6,7,9,10,11,12,13,14,15,17,18,19,20,... The third successor of 3 is now 7 and the 7th of 7 is 15 leaving 1,3,5,6,8,9,10,11,12,13,14,16,... %t A056875 S = Range[200]; S0 = {}; i = 1; %t A056875 While[S != S0, ii = NestWhileList[#+S[[#]] &, i+S[[i]], # <= Length[S]&]; S0 = S; S = Delete[S, List /@ Select[ii, # <= Length[S]&]]; i++]; %t A056875 S (* _Jean-François Alcover_, Dec 11 2019 *) %o A056875 (Haskell) %o A056875 a056875 n = a056875_list !! (n-1) %o A056875 a056875_list = f [1..] where %o A056875 f zs = head zs : f (g zs) where %o A056875 g (x:xs) = us ++ g vs where (us, vs) = splitAt (x - 1) xs %o A056875 -- _Reinhard Zumkeller_, Sep 11 2013 %Y A056875 Cf. A066680, A232054 (complement). %K A056875 nonn,easy,nice %O A056875 0,2 %A A056875 Thomas Schulze (jazariel(AT)tiscalenet.it), Sep 02 2000