1,3

Note the indexing: Domain starts from 1, range from 0.

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

Index entries for sequences that are permutations of the natural numbers

a(1) = 0, after which, a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A269380(n)).

As a composition of other permutations:

a(n) = A252754(A269172(n)).

a(n) = A269378(A260742(n)).

(Scheme, with memoization-macro definec)

(definec (A269388 n) (cond ((= 1 n) (- n 1)) ((even? n) (+ 1 (* 2 (A269388 (/ n 2))))) (else (* 2 (A269388 (A269380 n))))))

Inverse: A269387.

Cf. A269380.

Related permutations: A260742, A269386, A269172.

Cf. also A252754, A269378.

Differs from A156552, A252754 and A246677(n-1) for the first time at n=19, which here a(19)=12, instead of 128.

Sequence in context: A246684 A249812 A246675 * A252754 A246677 A156552

Adjacent sequences: A269385 A269386 A269387 * A269389 A269390 A269391

nonn

Antti Karttunen, Mar 01 2016

approved