login
A304088
Restricted growth sequence transform of A278222(A304083(n)).
4
1, 2, 3, 2, 4, 3, 2, 5, 6, 4, 3, 2, 7, 5, 7, 5, 8, 6, 4, 3, 2, 9, 7, 5, 10, 7, 5, 9, 7, 5, 11, 12, 7, 13, 9, 4, 3, 2, 8, 6, 7, 5, 14, 9, 7, 5, 13, 10, 7, 5, 10, 7, 14, 9, 7, 5, 15, 11, 15, 11, 16, 15, 11, 9, 7, 12, 8, 6, 4, 3, 2, 17, 14, 9, 7, 5, 18, 14, 9, 7, 5, 19, 13, 9, 7, 5, 20, 15, 11, 18, 13, 10, 7, 5, 21, 15, 11, 21, 15, 11, 17, 14, 9, 7, 5
OFFSET
0,2
LINKS
FORMULA
For all i, j: a(i) = a(j) => A304089(i) = A304089(j).
PROG
(PARI)
\\ Needs also code from A304083:
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(A304083(n-1)))), "b304088.txt");
CROSSREFS
Cf. also A303779.
Sequence in context: A375513 A325239 A328739 * A286597 A358667 A358552
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 06 2018
STATUS
approved