login
A324530
Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A033879(n), A318458(n)] for all other numbers, except f(1) = -1.
5
1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 10, 11, 12, 13, 2, 14, 15, 16, 17, 9, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 2, 16, 28, 19, 29, 30, 31, 19, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 2, 39, 56, 57, 58, 35, 59, 60, 61, 62, 63, 64, 65, 51, 66, 67, 68, 41, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 51, 80
OFFSET
1,2
FORMULA
a(2^n) = 2 for all n >= 1.
PROG
(PARI)
up_to = 65537;
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; };
A033879(n) = (n+n-sigma(n));
A318458(n) = bitand(n, sigma(n)-n);
Aux324530(n) = if(1==n, -1, [A033879(n), A318458(n)]);
v324530 = rgs_transform(vector(up_to, n, Aux324530(n)));
A324530(n) = v324530[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 05 2019
STATUS
approved