login
A290076
Restricted growth sequence transform of A289625(A005940(1+n)).
3
1, 1, 2, 2, 3, 2, 4, 5, 4, 3, 6, 5, 7, 4, 8, 6, 9, 4, 10, 6, 11, 6, 11, 12, 13, 7, 14, 10, 15, 8, 16, 17, 18, 9, 19, 10, 14, 10, 20, 21, 22, 11, 23, 21, 24, 11, 25, 21, 26, 13, 27, 14, 28, 14, 24, 29, 30, 15, 31, 32, 33, 16, 34, 35, 36, 18, 11, 19, 37, 19, 22, 29, 38, 14, 39, 29, 40, 20, 41, 42, 24, 22, 43, 23, 44, 23, 45, 46, 47, 24, 44, 23, 48, 25
OFFSET
0,3
COMMENTS
For all i, j: a(i) = a(j) => A290077(i) = A290077(j).
PROG
(PARI)
allocatemem(2^31);
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 }; \\ Modified from code of M. F. Hasler
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(0, rgs_transform(vector(8193, n, A289625(A005940((1+n)-1)))), "b290076_upto8192.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 19 2017
STATUS
approved