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”).

A331174
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = min(n, A122111(n)), for all other n, except for odd primes p, f(p) = 0.
3
1, 2, 3, 4, 3, 5, 3, 6, 7, 8, 3, 8, 3, 9, 10, 11, 3, 10, 3, 12, 13, 14, 3, 9, 15, 16, 15, 17, 3, 18, 3, 19, 20, 21, 22, 13, 3, 23, 24, 17, 3, 25, 3, 26, 27, 28, 3, 14, 29, 27, 30, 31, 3, 22, 32, 33, 34, 35, 3, 25, 3, 36, 37, 38, 39, 40, 3, 41, 42, 43, 3, 20, 3, 44, 45, 46, 47, 48, 3, 26, 29, 49, 3, 50, 51, 52, 53, 54, 3, 43, 55, 56, 57, 58, 59, 16, 3, 60, 61, 37, 3, 62, 3, 63, 64
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of function f(n) = 0 if n is an odd prime, otherwise f(n) = A331170(n).
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j) => A001221(i) = A001221(j).
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; };
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)};
A122111(n) = if(1==n, n, prime(bigomega(n))*A122111(A064989(n)));
Aux331174(n) = if((n%2)&&isprime(n), 0, min(n, A122111(n)));
v331174 = rgs_transform(vector(up_to, n, Aux331174(n)));
A331174(n) = v331174[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 15 2020
STATUS
approved