|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
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).
|
|
LINKS
|
|
|
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(4) = a(2*2) = nonludic(a(2)) = A192607(4) = 9.
|
|
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"]];
|
|
PROG
|
(Haskell)
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])
(Scheme, with Antti Karttunen's IntSeq-library for memoizing definec-macro)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|