login
A304112
Restricted growth sequence transform of A246277(A064413(n)), related to indices in the prime factorization of EKG sequence.
3
1, 2, 3, 4, 2, 3, 5, 6, 7, 2, 4, 8, 9, 2, 7, 10, 11, 12, 13, 2, 9, 6, 14, 3, 4, 15, 16, 2, 13, 17, 18, 19, 2, 16, 20, 21, 2, 19, 5, 22, 23, 24, 2, 21, 25, 26, 27, 28, 29, 3, 12, 30, 7, 9, 31, 32, 2, 24, 33, 34, 2, 32, 35, 36, 37, 38, 2, 34, 8, 39, 40, 41, 42, 2, 38, 11, 43, 4, 44, 45, 2, 42, 46, 13, 16, 47, 48, 49, 2, 45, 50, 51, 7
OFFSET
1,2
COMMENTS
For all i, j: a(i) = a(j) => A304113(i) = A304113(j).
PROG
(PARI)
\\ Needs also code for A064413:
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); };
Aux304112(n) = A246277(A064413(n));
write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
write_to_bfile(1, rgs_transform(vector(65539, n, Aux304112(n))), "b304112.txt");
CROSSREFS
Cf. also A304114.
Sequence in context: A330786 A182985 A304113 * A293446 A360378 A256443
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 17 2018
STATUS
approved