login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A323888
Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A032742(n),A302042(n)] for all n > 1, with f(1) = 0.
6
1, 2, 2, 3, 2, 4, 2, 5, 4, 6, 2, 7, 2, 8, 6, 9, 2, 10, 2, 11, 12, 13, 2, 14, 6, 15, 16, 17, 2, 18, 2, 19, 20, 21, 8, 22, 2, 23, 24, 25, 2, 26, 2, 27, 28, 29, 2, 30, 8, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 2, 40, 41, 42, 24, 43, 2, 44, 45, 46, 2, 47, 2, 48, 49, 50, 13, 51, 2, 52, 53, 54, 2, 55, 56, 57, 58, 59, 2, 60, 61, 62, 63, 64, 65, 66, 2, 67, 68, 69, 2, 70, 2
OFFSET
1,2
COMMENTS
For all i, j:
A305800(i) = A305800(j) => a(i) = a(j),
a(i) = a(j) => A001222(i) = A001222(j),
a(i) = a(j) => A253557(i) = A253557(j).
LINKS
PROG
(PARI)
up_to = 65537;
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; };
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; };
A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
A032742(n) = (n/A020639(n));
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));
A323888aux(n) = if(1==n, 0, [A032742(n), A302042(n)]);
v323888 = rgs_transform(vector(up_to, n, A323888aux(n)));
A323888(n) = v323888[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 08 2019
STATUS
approved