login
A300229
Restricted growth sequence transform of A285729, combining A032742(n) and A046523(n), the largest proper divisor and the prime signature of n.
9
1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 7, 10, 2, 11, 2, 12, 9, 13, 2, 14, 15, 16, 17, 18, 2, 19, 2, 20, 13, 21, 9, 22, 2, 23, 16, 24, 2, 25, 2, 26, 27, 28, 2, 29, 30, 31, 21, 32, 2, 33, 13, 34, 23, 35, 2, 36, 2, 37, 38, 39, 16, 40, 2, 41, 28, 42, 2, 43, 2, 44, 31, 45, 13, 46, 2, 47, 48, 49, 2, 50, 21, 51, 35, 52, 2, 53, 16, 54, 37, 55, 23, 56, 2, 57
OFFSET
1,2
LINKS
EXAMPLE
a(10) = a(15) (= 7) because both are nonsquare semiprimes (2*5 and 3*5), and when the smallest prime factor is divided out, both yield the same quotient, 5.
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])); }
A032742(n) = if(1==n, n, n/vecmin(factor(n)[, 1]));
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A285729(n) = (1/2)*(2 + ((A032742(n)+A046523(n))^2) - A032742(n) - 3*A046523(n));
write_to_bfile(1, rgs_transform(vector(65537, n, A285729(n))), "b300229.txt");
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 01 2018
STATUS
approved