[go: up one dir, main page]

login
Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = [A322867(n), A323174(n)] for n > 1, and f(1) = 0.
5

%I #7 Jan 11 2019 20:35:50

%S 1,2,2,3,2,4,2,5,6,7,2,3,2,8,9,10,2,11,2,12,13,14,2,15,16,17,18,19,2,

%T 20,2,21,22,23,20,21,2,24,25,26,2,27,2,28,29,30,2,31,32,33,34,35,2,36,

%U 37,38,39,40,2,41,2,42,43,44,45,46,2,47,48,49,2,50,2,51,52,53,54,55,2,15,32,56,2,57,58,59,60,61,2,62,63,64,65,66,67,21,2,68,69,70,2,71,2,57

%N Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = [A322867(n), A323174(n)] for n > 1, and f(1) = 0.

%C Restricted growth sequence transform of function f, with f(1) = 0 and f(n) = [A322867(n), A323174(n)] for n > 1.

%C Equally, restricted growth sequence transform of function f, with f(1) = 0 and f(n) = A318310(A122111(n)) for n > 1.

%C For all i, j:

%C a(i) = a(j) => A322867(i) = A322867(j),

%C a(i) = a(j) => A323167(i) = A323167(j),

%C a(i) = a(j) => A323174(i) = A323174(j).

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

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

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>

%o (PARI)

%o up_to = 4096;

%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 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));

%o A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };

%o A294898(n) = (A005187(n)-sigma(n));

%o A318310aux(n) = [hammingweight(n), A294898(n)];

%o A323168aux(n) = if(1==n,0,A318310aux(A122111(n)));

%o v323168 = rgs_transform(vector(up_to, n, A323168aux(n)));

%o A323168(n) = v323168[n];

%Y Cf. A000203, A005187, A122111, A294898, A318310, A322867, A323167, A323173, A323174.

%Y Cf. also A323240.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 10 2019