A296080 Restricted growth sequence transform of A289625(1+phi(n)), where phi = A000010, Euler totient function.
1, 1, 2, 2, 3, 2, 4, 3, 4, 3, 5, 3, 6, 4, 4, 4, 7, 4, 8, 4, 6, 5, 9, 4, 10, 6, 8, 6, 11, 4, 12, 7, 10, 7, 13, 6, 14, 8, 13, 7, 15, 6, 16, 10, 13, 9, 17, 7, 16, 10, 18, 13, 19, 8, 15, 13, 14, 11, 20, 7, 21, 12, 14, 18, 16, 10, 22, 18, 23, 13, 24, 13, 25, 14, 15, 14, 21, 13, 26, 18, 27, 15, 28, 13, 29, 16, 30, 15, 31, 13, 25, 23, 21, 17, 25, 18, 32, 16, 21, 15
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
PARI
allocatemem(2^30); up_to = 65537; rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,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])); } A289625(n) = { my(m=1,p=2,v=znstar(n)[2]); for(i=1,length(v),m *= p^v[i]; p = nextprime(p+1)); (m); }; write_to_bfile(1,rgs_transform(vector(up_to,n,A289625(1+eulerphi(n)))),"b296080.txt");