login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A323248(n) for n > 1, and f(1) = -1.
3

%I #6 Jan 11 2019 20:36:46

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

%T 17,18,19,20,21,2,22,23,12,2,24,2,25,26,27,2,28,23,11,29,30,2,31,32,

%U 33,23,34,2,35,2,36,37,11,38,39,2,40,41,42,2,24,2,43,6,44,45,46,2,47,48,49,2,50,51,52,53,54,2,38,55,56,57,58,59,60,2,35,61,54,2

%N Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A323248(n) for n > 1, and f(1) = -1.

%H Antti Karttunen, <a href="/A323246/b323246.txt">Table of n, a(n) for n = 1..4096</a>

%o (PARI)

%o up_to = 1024;

%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 A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));

%o A323244(n) = if(1==n, 0, my(k=A156552(n)); (2*k)-sigma(k));

%o A323248(n) = (A323244(n) - bigomega(n));

%o A323246aux(n) = if(1==n,-1,A323248(n));

%o v323246 = rgs_transform(vector(up_to, n, A323246aux(n)));

%o A323246(n) = v323246[n];

%Y Cf. A323248.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 10 2019