login
a(n) = gcd(n, A079892(n)), where A079892(n) is the least number > n having one more distinct prime factor than n.
4

%I #11 Mar 02 2023 16:18:43

%S 1,2,3,2,1,6,1,2,1,10,1,6,1,2,15,2,1,6,1,10,3,2,1,6,1,2,1,2,1,30,1,1,

%T 3,2,7,6,1,2,3,2,1,42,1,4,15,2,1,12,1,10,3,4,1,6,5,4,3,2,1,30,1,2,3,1,

%U 1,6,1,2,1,70,1,6,1,2,3,2,1,6,1,4,1,2,1,42,5,2,3,2,1,30,1,2,3,2,1,6,1,2,3,2

%N a(n) = gcd(n, A079892(n)), where A079892(n) is the least number > n having one more distinct prime factor than n.

%H Antti Karttunen, <a href="/A079893/b079893.txt">Table of n, a(n) for n = 1..20000</a>

%o (PARI) A079893(n) = { my(x=1+omega(n)); for(k=1+n, oo, if(omega(k)==x, return(gcd(k,n)))); }; \\ _Antti Karttunen_, Mar 02 2023

%Y Cf. A079891, A079894.

%K nonn,look

%O 1,2

%A _Reinhard Zumkeller_, Jan 14 2003