login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269391 Permutation of natural numbers: a(1) = 1, a(A233271(1+n)) = 2*a(n), a(A269390(n)) = 1 + 2*a(n), where A233271 is the infinite trunk of inverted binary beanstalk and A269390 is its complement. 6
1, 2, 3, 4, 5, 7, 6, 8, 9, 11, 15, 10, 13, 17, 14, 12, 19, 23, 31, 21, 16, 27, 35, 18, 29, 25, 39, 22, 47, 63, 30, 20, 43, 33, 55, 71, 37, 26, 59, 51, 79, 34, 45, 95, 127, 28, 61, 41, 24, 87, 67, 111, 38, 143, 75, 46, 53, 119, 103, 62, 159, 69, 42, 32, 91, 191, 255, 57, 123, 83, 54, 49, 175, 135, 70, 223, 77, 287, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(1) = 1, for n > 1, if A269381(n) - A269381(n-1) > 0 [when n is in A233271] a(n) = 2*a(A269381(n)-1), otherwise a(n) = 1 + 2*a(n-A269381(n)).

As a composition of other permutations:

a(n) = A269401(A269397(n)).

PROG

(Scheme, with memoization-macro definec)

(definec (A269391 n) (cond ((<= n 1) n) ((zero? (- (A269381 n) (A269381 (- n 1)))) (+ 1 (* 2 (A269391 (- n (A269381 n)))))) (else (* 2 (A269391 (+ -1 (A269381 n)))))))

CROSSREFS

Inverse: A269392.

Cf. A233271, A269381, A269390.

Cf. also A260431.

Similar or related permutations: A269397, A269401.

Sequence in context: A233279 A267111 A161919 * A095903 A267112 A269392

Adjacent sequences:  A269388 A269389 A269390 * A269392 A269393 A269394

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Mar 05 2016

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 14 13:39 EDT 2021. Contains 345025 sequences. (Running on oeis4.)