The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A217122 a(n) = (number of 1's in binary expansion of n)th positive number not among the previous terms 4
1, 2, 4, 3, 6, 7, 9, 5, 10, 11, 13, 12, 15, 16, 18, 8, 17, 19, 21, 20, 23, 24, 26, 22, 27, 28, 30, 29, 32, 33, 35, 14, 31, 34, 37, 36, 39, 40, 42, 38, 43, 44, 46, 45, 48, 49, 51, 41, 50, 52, 54, 53, 56, 57, 59, 55, 60, 61, 63, 62, 65, 66, 68, 25, 58, 64, 69, 67, 71, 72, 74, 70, 75, 76, 78, 77, 80, 81, 83, 73, 82, 84, 86, 85, 88, 89, 91, 87, 92 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This is a permutation of the positive numbers.
LINKS
EXAMPLE
3 has 2 1's in its binary expansion, and the 2nd positive number not among the previous terms is 4; hence a(3)=4
PROG
(Haskell)
import Data.List (delete)
a217122 n = a217122_list !! (n-1)
a217122_list = f 1 [0..] where
f x zs = y : f (x + 1) (delete y zs) where
y = zs !! a000120 x
-- Reinhard Zumkeller, May 11 2013
CROSSREFS
Cf. A000120: number of 1's in binary expansion of n.
Cf. A225589 (inverse), A075311.
Sequence in context: A358467 A006016 A227413 * A239622 A245604 A054239
KEYWORD
nonn,base
AUTHOR
Paul Tek, Mar 16 2013
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 June 12 12:27 EDT 2024. Contains 373331 sequences. (Running on oeis4.)