login
Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(1+i) = A007814(1+j) and A009194(i) = A009194(j), for all i, j >= 1.
3

%I #7 Jul 11 2020 17:57:54

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

%T 13,6,3,2,1,6,5,14,1,4,3,7,13,6,15,7,1,2,16,6,1,4,5,17,1,6,3,10,1,6,

%U 18,2,1,4,3,6,13,6,5,9,1,6,3,7,1,4,15,6,1,6,3,11,1,6,19,7,1,20,21,7,1,6,22,10,1,2,16,2,1,4,5,6,13

%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(1+i) = A007814(1+j) and A009194(i) = A009194(j), for all i, j >= 1.

%C Restricted growth sequence transform of the ordered pair [A007814(1+n), A009194(n)]. Note that A007814(1+n) gives the number of trailing 1-bits in the binary expansion of n.

%C For all i, j: A324400(i) = A324400(j) => a(i) = a(j).

%H Antti Karttunen, <a href="/A336153/b336153.txt">Table of n, a(n) for n = 1..65537</a>

%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 A007814(n) = valuation(n,2);

%o A009194(n) = gcd(n, sigma(n));

%o Aux336153(n) = [A007814(1+n), A009194(n)];

%o v336153 = rgs_transform(vector(up_to, n, Aux336153(n)));

%o A336153(n) = v336153[n];

%Y Cf. A007814, A009194.

%Y Cf. also A324400, A331747, A336154, A336155, A336156.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jul 11 2020