The OEIS is supported by the many generous donors to the OEIS Foundation.

A237126
a(0)=0, a(1) = 1, a(2n) = nonludic(a(n)), a(2n+1) = ludic(a(n)+1), where ludic = A003309, nonludic = A192607.
25
0, 1, 4, 2, 9, 7, 6, 3, 16, 25, 14, 17, 12, 13, 8, 5, 26, 61, 36, 115, 22, 47, 27, 67, 20, 41, 21, 43, 15, 23, 10, 11, 38, 119, 81, 359, 51, 179, 146, 791, 33, 91, 64, 247, 39, 121, 88, 407, 31, 83, 57, 221, 32, 89, 59, 227, 24, 53, 34, 97, 18, 29, 19, 37, 54
OFFSET
0,3
Shares with permutation A237056 the property that the other bisection consists of only ludic numbers and the other bisection of only nonludic numbers. However, instead of placing terms in those subsets in monotone order this sequence recursively permutes the order of both subsets with the emerging permutation itself, so this is a kind of "deep" variant of A237056.
Alternatively, this can be viewed as yet another "entanglement permutation", where two pairs of complementary subsets of natural numbers are entangled with each other. In this case a complementary pair odd/even numbers (A005408/A005843) is entangled with a complementary pair ludic/nonludic numbers (A003309/A192607).
FORMULA
a(0)=0, a(1) = 1, a(2n) = nonludic(a(n)), a(2n+1) = ludic(a(n)+1), where ludic = A003309, nonludic = A192607.
EXAMPLE
a(2) = a(2*1) = nonludic(a(1)) = A192607(1) = 4.
a(3) = a(2*1+1) = ludic(a(1)+1) = A003309(1+1) = A003309(2) = 2.
a(4) = a(2*2) = nonludic(a(2)) = A192607(4) = 9.
a(5) = a(2*2+1) = ludic(a(2)+1) = A003309(4+1) = A003309(5) = 7.
MATHEMATICA
nmax = 64;
T = Range[2, 20 nmax];
L = {1};
While[Length[T] > 0, With[{k = First[T]},
AppendTo[L, k]; T = Drop[T, {1, -1, k}]]];
nonL = Complement[Range[Last[L]], L];
a[n_] := a[n] = Which[
n < 2, n,
EvenQ[n] && a[n/2] <= Length[nonL], nonL[[a[n/2]]],
OddQ[n] && a[(n-1)/2]+1 <= Length[L], L[[a[(n-1)/2]+1]],
True, Print[" error: n = ", n, " size of T should be increased"]];
Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Oct 10 2021, after Ray Chandler in A003309 *)
PROG
import Data.List (transpose)
a237126 n = a237126_list !! n
a237126_list = 0 : es where
es = 1 : concat (transpose [map a192607 es, map (a003309 . (+ 1)) es])
-- Reinhard Zumkeller, Feb 10 2014, Feb 06 2014
(Scheme, with Antti Karttunen's IntSeq-library for memoizing definec-macro)
(definec (A237126 n) (cond ((< n 2) n) ((even? n) (A192607 (A237126 (/ n 2)))) (else (A003309 (+ 1 (A237126 (/ (- n 1) 2))))))) ;; Antti Karttunen, Feb 07 2014
CROSSREFS
Cf. A237427 (inverse), A237056, A235491.
Similarly constructed permutations: A227413/A135141.
Sequence in context: A257730 A246378 A260422 * A246380 A200639 A365255
KEYWORD
nonn
AUTHOR
STATUS
approved

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

Last modified September 20 18:47 EDT 2024. Contains 376075 sequences. (Running on oeis4.)