login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A331595(n) for all other n, except for odd primes p, f(p) = 0.
2

%I #7 Jan 25 2020 20:53:34

%S 1,2,3,4,3,4,3,5,4,4,3,5,3,4,6,7,3,8,3,5,6,4,3,7,4,4,5,5,3,8,3,9,6,4,

%T 6,7,3,4,6,7,3,8,3,5,10,4,3,9,4,11,6,5,3,7,12,7,6,4,3,7,3,4,10,13,12,

%U 8,3,5,6,11,3,9,3,4,8,5,6,8,3,9,7,4,3,7,12,4,6,7,3,7,12,5,6,4,12,13,3,14,10,7,3,8,3,7,15

%N Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A331595(n) for all other n, except for odd primes p, f(p) = 0.

%C For all i, j:

%C A305801(i) = A305801(j) => a(i) = a(j),

%C a(i) = a(j) => A331597(i) = A331597(j) => A331596(i) = A331596(j),

%C a(i) = a(j) => A331731(i) = A331731(j) => A331600(i) = A331600(j).

%H Antti Karttunen, <a href="/A331730/b331730.txt">Table of n, a(n) for n = 1..65537</a>

%o (PARI)

%o up_to = 65537;

%o 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; };

%o 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)};

%o A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));

%o A241909(n) = if(1==n||isprime(n),2^primepi(n),my(f=factor(n),h=1,i,m=1,p=1,k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k,1]); m *= p^(i-h); h = i; if(f[k,2]>1, f[k,2]--, k++)); (p*m));

%o A331595(n) = gcd(A122111(n), A241909(n));

%o Aux331730(n) = if((n%2)&&isprime(n),0,A331595(n));

%o v331730 = rgs_transform(vector(up_to, n, Aux331730(n)));

%o A331730(n) = v331730[n];

%Y Cf. A122111, A241909, A305801, A331594, A331595, A331596, A331597, A331600, A331731.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 25 2020