login
Permutation of natural numbers: a(1) = 1, a(A257803(1+n)) = 2*a(n), a(A257804(n)) = 1 + 2*a(n), where A257803 and A257804 give the positions of odd and even terms in A233271, the infinite trunk of inverted binary beanstalk.
3

%I #7 Jul 27 2015 22:15:16

%S 1,3,7,2,15,5,6,31,14,11,13,4,63,29,23,27,30,10,9,127,12,59,62,28,22,

%T 47,26,55,61,8,21,19,255,126,58,25,119,46,125,57,54,60,45,95,53,111,

%U 123,17,20,43,39,18,254,24,118,511,124,253,117,56,51,239,93,44,94,251,115,52,109,110,121,91,122,16,42,38,510,191,107,223,252,116,50,247,35,41

%N Permutation of natural numbers: a(1) = 1, a(A257803(1+n)) = 2*a(n), a(A257804(n)) = 1 + 2*a(n), where A257803 and A257804 give the positions of odd and even terms in A233271, the infinite trunk of inverted binary beanstalk.

%H Antti Karttunen, <a href="/A260433/b260433.txt">Table of n, a(n) for n = 1..20000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(1) = 1; for n > 1, if A257800(n) = 0 [when n is one of the terms of A257804] a(n) = 1 + 2*a(A257808(n)), otherwise [when n is one of the terms of A257803] a(n) = 2*a(A257807(n)-1).

%F As a composition of other permutations:

%F a(n) = A054429(A260431(n)).

%F a(n) = A260431(A260430(n)).

%o (Scheme, with memoizing macro definec)

%o (definec (A260433 n) (cond ((<= n 1) n) ((zero? (A257800 n)) (+ 1 (* 2 (A260433 (A257808 n))))) (else (* 2 (A260433 (+ -1 (A257807 n)))))))

%Y Inverse: A260434.

%Y Related permutations: A260431, A260430, A054429.

%Y Cf. A257800, A257803, A257804, A257807, A257808.

%Y Cf. also A233271, A257806.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jul 27 2015