login

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

Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = A048675(n) for all other numbers, except f(n) = -1 if n is an odd prime.
5

%I #19 Jan 20 2019 02:57:18

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

%T 7,15,16,17,9,3,18,19,14,3,20,3,15,12,21,3,9,22,8,23,19,3,14,24,20,25,

%U 26,3,12,3,27,17,9,28,29,3,23,30,31,3,14,3,32,10,25,33,34,3,12,12,35,3,17,36,37,38,29,3,8,39,30,40,41,42,14,3,11,24,10,3,43,3,34,44

%N Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = A048675(n) for all other numbers, except f(n) = -1 if n is an odd prime.

%C For all i, j > 1:

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

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

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

%H Antti Karttunen, <a href="/A322816/b322816.txt">Table of n, a(n) for n = 1..65537</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 A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675

%o A322816aux(n) = if((n>2)&&isprime(n),-1,A048675(n));

%o v322816 = rgs_transform(vector(up_to,n,A322816aux(n)));

%o A322816(n) = v322816[n];

%Y Cf. A048675, A305801, A322812, A322815, A322869, A323078.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 27 2018