A300827 Lexicographically earliest sequence such that a(i) = a(j) => A324193(i) = A324193(j) for all i, j >= 1.
1, 2, 2, 3, 2, 4, 2, 4, 5, 6, 2, 7, 2, 8, 9, 10, 2, 11, 2, 12, 13, 14, 2, 15, 16, 17, 9, 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, 38, 39, 40, 41, 2, 42, 2, 43, 44, 45, 46, 47, 2, 48, 49, 50, 2, 51, 2, 52, 53, 54, 55, 56, 2, 57, 58, 59, 2, 60, 61, 62, 63, 64, 2, 65, 66, 67
Offset: 1
Keywords
Examples
For n = 15, with proper divisors 3 and 5, we have f(n) = prime(1+A297167(3)) * prime(1+A297167(5)) = prime(2)*prime(3) = 3*5 = 15. For n = 27, with proper divisors 3 and 9, we have f(n) = prime(1+A297167(3)) * prime(1+A297167(9)) = prime(2)*prime(3) = 3*5 = 15. Because f(15) = f(27), the restricted growth sequence transform allots the same number (in this case 9) for both, so a(15) = a(27) = 9.
Links
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])); } A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After M. F. Hasler's code for A006530. A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) -1)); Aux300827(n) = { my(m=1); if(n<=2, n-1, fordiv(n,d,if((d>1)&(d
A297167(d)))); (m)); }; write_to_bfile(1,rgs_transform(vector(up_to,n,Aux300827(n))),"b300827.txt");
Formula
Extensions
Name changed by Antti Karttunen, Feb 21 2019
Comments