login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094510 Smallest number distinct from n, not occurring earlier and having in binary representation exactly as many ones as n. 3
2, 1, 5, 8, 3, 9, 11, 4, 6, 12, 7, 10, 14, 13, 23, 32, 18, 17, 21, 24, 19, 25, 15, 20, 22, 28, 29, 26, 27, 39, 47, 16, 34, 33, 37, 40, 35, 41, 30, 36, 38, 44, 45, 42, 43, 51, 31, 65, 50, 49, 46, 56, 54, 53, 59, 52, 58, 57, 55, 71, 62, 61, 95, 128, 48, 68, 69, 66, 67, 73, 60 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(a(n))=n: a self-inverse permutation of natural numbers.

LINKS

Paul Tek, Table of n, a(n) for n = 1..10000

Index entries for sequences that are permutations of the natural numbers

Index entries for sequences related to binary expansion of n

PROG

(Haskell)

import Data.List (delete)

a094510 n = a094510_list !! (n-1)

a094510_list = f 1 [1..] where

   f x zs = g zs where

     g (y:ys) = if y /= x && a000120 y == wt

                   then y : f (x + 1) (delete y zs) else g ys

     wt = a000120 x

-- Reinhard Zumkeller, Nov 23 2014

CROSSREFS

Cf. A094511, A007088, A000120.

Sequence in context: A059274 A082635 A166623 * A023677 A108599 A108590

Adjacent sequences:  A094507 A094508 A094509 * A094511 A094512 A094513

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, May 06 2004

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified March 28 02:40 EDT 2017. Contains 284182 sequences.