login
a(n) = gcd(n, A163511(n)).
18

%I #21 Sep 01 2023 15:23:26

%S 1,1,2,3,4,1,6,1,8,9,2,1,12,1,2,1,16,1,18,1,4,3,2,1,24,5,2,1,4,1,2,1,

%T 32,3,2,5,36,1,2,1,8,1,6,1,4,3,2,1,48,1,10,1,4,1,2,11,8,3,2,1,4,1,2,1,

%U 64,1,6,1,4,3,10,1,72,1,2,5,4,7,2,1,16,27,2,1,12,5,2,1,8,1,6,1,4,3,2,1,96,1,2,1,20,1,2,1,8,105

%N a(n) = gcd(n, A163511(n)).

%H Antti Karttunen, <a href="/A364255/b364255.txt">Table of n, a(n) for n = 0..16383</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F From _Antti Karttunen_, Sep 01 2023: (Start)

%F a(n) = gcd(n, A364258(n)) = gcd(A163511(n), A364258(n)).

%F a(n) = n / A364491(n) = A163511(n)/ A364492(n).

%F (End)

%o (Python)

%o from math import gcd

%o from sympy import nextprime

%o def A364255(n):

%o c, p, k = 1, 1, n

%o while k:

%o c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())

%o k >>= s+1

%o return gcd(c*p,n) # _Chai Wah Wu_, Jul 25 2023

%o (PARI)

%o A163511(n) = if(!n,1,my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));

%o A364255(n) = gcd(n, A163511(n)); \\ _Antti Karttunen_, Sep 01 2023

%Y Cf. A163511, A364257 (Dirichlet inverse), A364258, A364491, A364492, A364493.

%Y Cf. also A364254, A364256, A339969, A364500, A364949.

%K nonn

%O 0,3

%A _Antti Karttunen_, Jul 16 2023