OFFSET
1,2
COMMENTS
LINKS
PROG
(PARI)
up_to = 4096;
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; };
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)};
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
A318310aux(n) = [hammingweight(n), A294898(n)];
A323168aux(n) = if(1==n, 0, A318310aux(A122111(n)));
v323168 = rgs_transform(vector(up_to, n, A323168aux(n)));
A323168(n) = v323168[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 10 2019
STATUS
approved