login
a(n) is the least k such that A161606(k) = n or a(n) = -1 if no such k exists.
0

%I #28 Nov 02 2025 10:59:18

%S 1,2,4,27,84,48,336,320,2112,1792,3840,26112,21504,45056,143360,

%T 212992,540672,1720320,2555904,4456448,17039360,19922944,53447376,

%U 204472320,239075328,385875968,1593835520,4278190080,4630511616,19126026240,30870077440,31138512896

%N a(n) is the least k such that A161606(k) = n or a(n) = -1 if no such k exists.

%C a(n) is the least k such that GCD(sopf(k), Omega(k)) = n. We assume that GCD(0,0) = 0.

%e The least k such that GCD(sopf(k), Omega(k)) = 0 is k = 1, thus a(0) = 1.

%e The least k such that GCD(sopf(k), Omega(k)) = 1 is k = 2, thus a(1) = 2.

%e The least k such that GCD(sopf(k), Omega(k)) = 2 is k = 4, thus a(2) = 4.

%o (Python)

%o from sympy import factorint

%o from math import gcd

%o def a(n, search_limit=10**5) -> int:

%o for k in range(1, search_limit):

%o f = factorint(k)

%o if n == gcd(sum(f.keys()), sum(f.values())):

%o return k

%o # if no k was found within the search range

%o return -1

%o print([a(n) for n in range(14)]) # _Peter Luschny_, Nov 02 2025

%Y Cf. A001222, A008472, A161606.

%K nonn

%O 0,2

%A _Ctibor O. Zizka_, Oct 30 2025