login
A324531
Lexicographically earliest sequence such that for all i, j >= 1, a(i) = a(j) => f(i) = f(j), where f(n) = [A278222(n), A318458(n)] for all other numbers, except f(1) = 0.
4
1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 10, 9, 11, 12, 2, 4, 13, 9, 14, 15, 16, 17, 10, 18, 19, 20, 21, 17, 22, 23, 2, 4, 7, 9, 24, 15, 16, 17, 25, 15, 26, 27, 28, 29, 30, 31, 10, 18, 32, 33, 34, 27, 35, 36, 37, 38, 39, 40, 41, 31, 42, 43, 2, 4, 44, 9, 7, 15, 45, 17, 46, 15, 47, 27, 48, 27, 49, 31, 50, 51, 51, 27, 52, 53, 54, 55, 56, 27, 57, 58, 59, 55, 60, 61, 10, 9, 48
OFFSET
1,2
COMMENTS
For all i, j:
a(i) = a(j) => A324532(i) = A324532(j).
FORMULA
For n >= 1, a(2^n) = 2.
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; };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from Charles R Greathouse IV, Aug 17 2011
A278222(n) = A046523(A005940(1+n));
A318458(n) = bitand(n, sigma(n)-n);
Aux324531(n) = if(1==n, 0, [A278222(n), A318458(n)]);
v324531 = rgs_transform(vector(up_to, n, Aux324531(n)));
A324531(n) = v324531[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 05 2019
STATUS
approved