login
Start with the natural numbers and repeatedly take and keep the current initial term i, and remove m and 2m, where m = i-th term of the rest; repeat.
2

%I #7 Mar 12 2015 17:59:14

%S 1,3,5,6,8,9,10,12,13,16,17,18,20,21,24,25,27,28,29,32,33,35,36,37,39,

%T 41,42,44,45,48,49,50,53,54,56,57,58,59,61,63,65,66,67,70,71,73,74,76,

%U 77,78,79,82,83,85,87,88,90,91,93,95,97,98,99,101,103

%N Start with the natural numbers and repeatedly take and keep the current initial term i, and remove m and 2m, where m = i-th term of the rest; repeat.

%H Reinhard Zumkeller, <a href="/A242535/b242535.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>

%e Start with 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...

%e step 1: take 1, remove (1st term from the rest) = 2 and 2*2 = 4,

%e leaving 3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26...

%e step 2: take 3, remove (3rd term from the rest) = 7 and 2*7 = 14,

%e leaving 5,6,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...

%e step 3: take 5, remove (5th term from the rest) = 11 and 2*11 = 22,

%e leaving 6,8,9,10,12,13,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,...

%e step 4: take 6, remove (6th term from the rest) = 15 and 2*15 = 30,

%e leaving 8,9,10,12,13,16,17,18,19,20,21,23,24,25,26,27,28,29,31,32,33,...

%e step 5: take 8, remove (8th term from the rest) = 19 and 2*19 = 38,

%e leaving 9,10,12,13,16,17,18,20,21,23,24,25,26,27,28,29,31,32,33,34,35,...

%e step 6: take 9, remove (9th term from the rest) = 23, and 2*23 = 46,

%e leaving 10,12,13,16,17,18,20,21,24,25,26,27,28,29,31,32,33,34,35,36,...

%o (Haskell)

%o import Data.List ((\\))

%o a242535 n = a242535_list !! (n-1)

%o a242535_list = f [1..] where

%o f xs'@(x:xs) = x : f (xs \\ [z, 2 * z]) where z = xs' !! x

%Y Cf. A136119.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, May 17 2014