A300232 Restricted growth sequence transform of A286152, filter combining A051953(n) and A046523(n), cototient and the prime signature of n.
1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 12, 13, 14, 2, 15, 16, 17, 18, 19, 2, 20, 2, 21, 22, 23, 24, 25, 2, 26, 27, 28, 2, 29, 2, 30, 31, 32, 2, 33, 34, 35, 36, 37, 2, 38, 27, 39, 40, 41, 2, 42, 2, 43, 44, 45, 46, 47, 2, 48, 49, 47, 2, 50, 2, 51, 52, 53, 46, 54, 2, 55, 56, 57, 2, 58, 40, 59, 60, 61, 2, 62, 36, 63, 64, 65, 66, 67, 2, 68, 69
Offset: 1
Keywords
Examples
a(39) = a(55) (= 27) because both are nonsquare semiprimes (3*13 and 5*11), and both have cototient value 15 = 39 - phi(39) = 55 - phi(55).
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Crossrefs
Programs
-
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; }; write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); } A051953(n) = (n - eulerphi(n)); 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 A286152(n) = (2 + ((A051953(n)+A046523(n))^2) - A051953(n) - 3*A046523(n))/2; write_to_bfile(1,rgs_transform(vector(up_to,n,A286152(n))),"b300232.txt");