proposed
approved
proposed
approved
editing
proposed
editing
proposed
Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n<=2) = -n, f(n) = 0 if n is an odd number > 1, and f(n) = A300226(n) for all other even numbers >= 4.
Antti Karttunen, <a href="/A323241/b323241.txt">Table of n, a(n) for n = 1..100000</a>
allocated Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n<=2) = -n, f(n) = 0 if n is an odd number > 1, and f(n) = A300226(n) for Antti Karttunenall other numbers.
1, 2, 3, 4, 3, 5, 3, 6, 3, 5, 3, 7, 3, 5, 3, 8, 3, 9, 3, 7, 3, 5, 3, 10, 3, 5, 3, 7, 3, 11, 3, 12, 3, 5, 3, 13, 3, 5, 3, 10, 3, 11, 3, 7, 3, 5, 3, 14, 3, 15, 3, 7, 3, 16, 3, 10, 3, 5, 3, 17, 3, 5, 3, 18, 3, 11, 3, 7, 3, 19, 3, 20, 3, 5, 3, 7, 3, 11, 3, 14, 3, 5, 3, 17, 3, 5, 3, 10, 3, 21, 3, 7, 3, 5, 3, 22, 3, 23, 3, 24, 3, 11, 3, 10, 3
1,2
(PARI)
up_to = 10000;
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; };
A052126(n) = if(1==n, n, n/vecmax(factor(n)[, 1]));
A319988(n) = ((n>1)&&(factor(n)[omega(n), 2]>1));
A323241aux(n) = if(n<=2, -n, if(n%2, 0, [A052126(n), A319988(n)]));
v323241 = rgs_transform(vector(up_to, n, A323241aux(n)));
A323241(n) = v323241[n];
allocated
nonn
Antti Karttunen, Jan 07 2019
approved
editing