login
A331747
Lexicographically earliest infinite sequence such that a(i) = a(j) => A009194(i) = A009194(j) and A278222(i) = A278222(j) for all i, j.
5
1, 1, 2, 1, 3, 4, 5, 1, 3, 6, 7, 8, 7, 9, 10, 1, 3, 11, 7, 6, 12, 13, 14, 15, 7, 13, 16, 17, 14, 18, 19, 1, 11, 6, 7, 3, 12, 13, 14, 20, 12, 21, 22, 23, 24, 25, 26, 8, 7, 7, 27, 13, 22, 28, 29, 30, 14, 25, 29, 31, 26, 32, 33, 1, 3, 34, 7, 6, 35, 13, 14, 11, 12, 36, 22, 23, 22, 37, 26, 6, 12, 36, 22, 38, 39, 40, 41, 23, 22, 42, 43, 44, 45, 46, 47, 15, 7, 7, 27, 7
OFFSET
1,3
COMMENTS
Restricted growth sequence transform of the ordered pair [A009194(n), A278222(n)].
For all i, j:
A331746(i) = A331746(j) => a(i) = a(j).
FORMULA
a(2^n) = 1 for all n >= 0.
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; };
A009194(n) = gcd(n, sigma(n));
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1)));
t };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A278222(n) = A046523(A005940(1+n));
Aux331747(n) = [A009194(n), A278222(n)];
v331747 = rgs_transform(vector(up_to, n, Aux331747(n)));
A331747(n) = v331747[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 04 2020
STATUS
approved