login
A304742
Restricted growth sequence transform of A246277(A280866(n)).
3
1, 2, 3, 2, 4, 5, 2, 6, 7, 3, 2, 8, 9, 2, 10, 11, 4, 12, 13, 6, 14, 15, 2, 2, 16, 17, 7, 2, 18, 19, 2, 20, 21, 5, 3, 4, 22, 23, 2, 24, 25, 26, 2, 27, 28, 8, 10, 29, 30, 15, 31, 32, 3, 2, 33, 34, 11, 2, 35, 36, 2, 37, 38, 14, 2, 39, 40, 17, 16, 41, 42, 12, 4, 6, 8, 43, 44, 6, 45, 46, 10, 47, 48, 15, 49, 50, 2, 51, 52
OFFSET
1,2
COMMENTS
For all i, j: a(i) = a(j) => A304743(i) = A304743(j).
PROG
(PARI)
\\ Needs also code from A280866:
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)); };
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; };
v304742 = rgs_transform(vector(65539, n, A246277(A280866(n))));
A304742(n) = v304742[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 18 2018
STATUS
approved