login
A323906
Lexicographically earliest sequence such that a(i) = a(j) => A323905(i) = A323905(j), for all i, j >= 1.
2
1, 1, 1, 2, 1, 3, 1, 4, 3, 4, 1, 5, 1, 6, 4, 7, 1, 6, 1, 8, 6, 9, 1, 10, 4, 11, 6, 12, 1, 13, 1, 14, 9, 15, 6, 16, 1, 17, 11, 11, 1, 14, 1, 18, 13, 19, 1, 20, 6, 9, 15, 21, 1, 22, 9, 23, 17, 24, 1, 25, 1, 26, 14, 27, 11, 28, 1, 29, 19, 30, 1, 31, 1, 32, 9, 33, 9, 34, 1, 35, 22, 36, 1, 37, 15, 38, 24, 39, 1, 40, 11, 41, 26, 42, 17, 43, 1, 11, 28, 20, 1, 44, 1, 45, 30
OFFSET
1,4
COMMENTS
Restricted growth sequence transform of A323905.
LINKS
PROG
(PARI)
up_to = 65537;
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; };
A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; \\ From A048675
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)};
A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
A323905(n) = (A156552(n) - A048675(n));
v323906 = rgs_transform(vector(up_to, n, A323905(n)));
A323906(n) = v323906[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 12 2019
STATUS
approved