login
Lexicographically earliest positive sequence such that a(i) = a(j) => A069010(i) = A069010(j) and A324386(i) = A324386(j), for all i, j >= 0.
4

%I #8 Feb 28 2019 18:53:45

%S 1,2,3,2,3,4,3,2,5,6,6,4,3,7,8,2,3,6,9,6,6,10,11,4,12,7,13,7,14,13,12,

%T 2,5,6,7,4,9,10,9,6,7,15,16,17,18,19,18,4,12,18,6,7,20,21,22,7,23,24,

%U 25,7,26,24,26,2,8,9,9,6,11,15,7,9,11,16,27,28,25,29,25,6,18,30,21,15,31,32,19,15,33,34,16,15,35,29,33,4,36,20,24,20,37,30,24,11

%N Lexicographically earliest positive sequence such that a(i) = a(j) => A069010(i) = A069010(j) and A324386(i) = A324386(j), for all i, j >= 0.

%C Restricted growth sequence transform of the ordered pair [A069010(n), A324386(n)].

%H Antti Karttunen, <a href="/A324380/b324380.txt">Table of n, a(n) for n = 0..65537</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>

%F a(A000225(n)) = 2 for all n >= 1.

%o (PARI)

%o up_to = 65537;

%o rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };

%o A069010(n) = ((1 + (hammingweight(bitxor(n, n>>1)))) >> 1); \\ From A069010

%o Aux324380(n) = [A069010(n), A324386(n)]; \\ Code for A324386 available in that entry.

%o v324380 = rgs_transform(vector(1+up_to,n,Aux324380(n-1)));

%o A324380(n) = v324380[1+n];

%Y Cf. A069010, A324386.

%Y Cf. also A324343, A324344, A324390.

%K nonn

%O 0,2

%A _Antti Karttunen_, Feb 27 2019