login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A111039 Start with the positive integers, and at the n-th step, remove every (a(n)+1)-st term from the list of numbers remaining, for n = 1, 2, 3, ... 1
1, 3, 5, 9, 11, 17, 19, 21, 25, 33, 35, 41, 43, 49, 51, 53, 57, 67, 69, 75, 83, 89, 97, 99, 101, 107, 113, 115, 117, 129, 131, 137, 139, 147, 149, 163, 169, 171, 177, 181, 193, 195, 197, 211, 213, 217, 227, 229, 233, 243, 245, 259, 261, 267, 277 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A variation on lucky numbers A000959: To get these, remove at the n-th step every a(n)-th remaining number, except for n = 1, where at the 1st step the even numbers are removed (as here).
LINKS
EXAMPLE
Start with A = [1, 2, 3, 4, ...]. For n = 1 (the 1st step), we have a(1)+1 = 1+1 = 2, so we remove every 2nd number. Then only the list A' of odd numbers remains.
For n = 2 (the 2nd step), we have a(2)+1 = 3+1 = 4, so we remove every 4th number from the list A', it remains A'' = [1,3,5, 9,11,13, 17,19,21, 25,...].
For n = 3 (the 3rd step), we have a(3) + 1 = 5 + 1 = 6, so we remove every 6th number from the above list A'' of remaining numbers. It remains A''' = [1,3,5,9,11, 17,19,21,25,27, 31,...].
For n = 4 (the 4th step), we have a(4)+1 = 9+1 = 10, and we remove every 10th number from the list A'''. And so on.
a(4) = 9, not 7 because 7 was removed during the 2nd iteration with the rest of the (a(2)+1)th numbers (15, 23, 31, 39, etc.) in the sequence remaining after the 1st iteration.
PROG
(PARI) A111039_upto(N, A=[1..N])={for(i=1, N, (i>#A||A[i]>#A)&& break; my(t=A[i]+1); A=vecextract(A, 2^#A-1-2^(#A\t*t)\(2^t-1)<<A[i])); A} \\ M. F. Hasler, Jan 29 2020
CROSSREFS
Cf. A000959 (lucky numbers).
Sequence in context: A310038 A372051 A036696 * A114512 A118113 A258165
KEYWORD
easy,nonn
AUTHOR
Brent Lehman, Oct 05 2005
EXTENSIONS
Edited by M. F. Hasler, Jan 29 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 04:49 EDT 2024. Contains 374586 sequences. (Running on oeis4.)