login
A303779
Restricted growth sequence transform of A278222(A303775(n)).
4
1, 2, 3, 2, 3, 2, 4, 5, 6, 5, 3, 2, 7, 4, 7, 4, 6, 2, 4, 7, 4, 8, 4, 9, 10, 7, 11, 7, 3, 2, 11, 7, 4, 12, 13, 7, 4, 6, 5, 3, 8, 7, 11, 7, 14, 15, 8, 5, 4, 10, 8, 4, 12, 7, 8, 7, 8, 7, 13, 9, 15, 9, 13, 9, 13, 2, 16, 9, 4, 13, 9, 4, 17, 9, 4, 13, 7, 18, 13, 7, 4, 13, 9, 19, 15, 8, 4, 17, 9, 8, 7, 8, 9, 13, 15, 13, 7, 11, 7, 3, 11, 7, 12, 13, 7
OFFSET
0,2
LINKS
FORMULA
For all i, j: a(i) = a(j) => A303780(i) = A303780(j).
PROG
(PARI)
\\ Needs also code from A303775:
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])); }
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A278222(n) = A046523(A005940(1+n));
write_to_bfile(0, rgs_transform(vector(65538, n, A278222(A303775(n-1)))), "b303779.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 06 2018
STATUS
approved