login
A300233
Filter sequence combining A051953(n) and A009194(n), cototient of n and gcd(n,sigma(n)).
7
1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 13, 14, 13, 2, 15, 16, 17, 14, 18, 2, 19, 2, 20, 21, 22, 23, 24, 2, 25, 26, 27, 2, 28, 2, 29, 30, 31, 2, 32, 33, 34, 35, 36, 2, 37, 26, 38, 39, 40, 2, 41, 2, 42, 43, 44, 45, 46, 2, 47, 48, 49, 2, 50, 2, 51, 52, 53, 45, 54, 2, 55, 43, 56, 2, 57, 39, 58, 59, 60, 2, 61, 62, 60, 63, 55, 64, 65, 2, 66
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of P(A051953(n), A009194(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.
LINKS
EXAMPLE
a(20) = a(22) (= 13) because A051953(20) = A051953(22) = 12 and A009194(20) = A009194(22) = 2.
PROG
(PARI)
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; };
write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
A009194(n) = gcd(n, sigma(n));
A051953(n) = (n - eulerphi(n));
Aux300233(n) = (1/2)*(2 + ((A051953(n)+A009194(n))^2) - A051953(n) - 3*A009194(n));
write_to_bfile(1, rgs_transform(vector(65537, n, Aux300233(n))), "b300233.txt");
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 01 2018
STATUS
approved