

A056875


Generated by sieving the natural numbers: keep the smallest remaining number k and take out its kth successor l as well as the lth successor m of l, the mth successor of m and so on. Then start again from the next remaining number.


3



1, 3, 5, 6, 9, 10, 11, 13, 14, 18, 19, 20, 21, 23, 24, 27, 28, 30, 33, 34, 36, 38, 40, 41, 42, 43, 44, 46, 47, 50, 51, 53, 55, 58, 59, 60, 62, 65, 68, 69, 70, 71, 73, 74, 76, 79, 80, 82, 83, 84, 85, 88, 89, 91, 92, 93, 95, 96, 97, 101, 102, 103, 105, 106, 109, 111, 113, 114
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

These numbers are homogeneously distributed with a density of approximately 0.59060.


LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Sieve
Wikipedia, Sieve theory
Index entries for sequences generated by sieves


EXAMPLE

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,...


PROG

(Haskell)
a056875 n = a056875_list !! (n1)
a056875_list = f [1..] where
f zs = head zs : f (g zs) where
g (x:xs) = us ++ g vs where (us, vs) = splitAt (x  1) xs
 Reinhard Zumkeller, Sep 11 2013


CROSSREFS

Cf. A066680, A232054 (complement).
Sequence in context: A161182 A267312 A269390 * A087757 A188163 A088359
Adjacent sequences: A056872 A056873 A056874 * A056876 A056877 A056878


KEYWORD

nonn,easy,nice


AUTHOR

Thomas Schulze (jazariel(AT)tiscalenet.it), Sep 02 2000


STATUS

approved



