login
A322870
Ordinal transform of A302043.
2
1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 3, 1, 1, 3, 3, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 4, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 2, 3, 1, 1, 4, 2, 1, 2, 1, 1, 1, 5, 2, 1, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 3, 2
OFFSET
1,4
LINKS
PROG
(PARI)
up_to = 1024;
ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om, invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om, invec[i], (1+pt))); outvec; };
A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
v078898 = ordinal_transform(vector(up_to, n, A020639(n)));
A078898(n) = v078898[n];
A302042(n) = if((1==n)||isprime(n), 1, my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p), d -= 1)); (k*p));
A302043(n) = (n - A302042(n));
v322870 = ordinal_transform(vector(up_to, n, A302043(n)));
A322870(n) = v322870[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 29 2018
STATUS
approved