login
A286614
Restricted growth sequence transform of A286613.
2
1, 2, 2, 2, 3, 4, 2, 5, 5, 2, 6, 2, 3, 5, 6, 2, 2, 2, 6, 7, 5, 2, 8, 6, 2, 5, 5, 2, 6, 6, 2, 5, 3, 6, 5, 6, 5, 2, 9, 5, 10, 6, 2, 5, 11, 2, 9, 5, 5, 9, 5, 5, 8, 12, 2, 6, 13, 5, 14, 2, 2, 9, 5, 5, 5, 5, 2, 2, 13, 6, 2, 2, 5, 2, 13, 8, 5, 5, 12, 6, 5, 5, 5, 2, 5, 6, 6, 5, 2, 2, 6, 6, 9, 5, 6, 15, 5, 5, 6, 5
OFFSET
0,2
LINKS
PROG
(PARI)
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])); }
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ This function from Michel Marcus
A048673(n) = (A003961(n)+1)/2;
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from Charles R Greathouse IV, Aug 17 2011
write_to_bfile(0, rgs_transform(vector(65537, n, A286613(n-1))), "b286614.txt");
CROSSREFS
Sequence in context: A338139 A244798 A308253 * A359481 A023508 A151553
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 30 2017
STATUS
approved