%I #31 Nov 24 2022 18:20:06
%S 1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,2,3,6,2,1,1,1,3,3,
%T 1,1,1,2,1,1,1,2,1,2,6,3,1,1,1,2,3,6,2,1,1,2,2,1,2,1,1,2,1,1,1,1,1,1,
%U 1,2,1,1,1,2,1,2,2,1,1,1,1,2,3,6,6,3,1,2,2,1,2,1,3,6,1,1,1,2,1,2
%N GCD of largest square and squarefree part of central binomial coefficients.
%H Antti Karttunen, <a href="/A056059/b056059.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A055229(A001405(n)), where A055229(n) = gcd(A008833(n), A007913(n)).
%e n=14, binomial(14,7) = 3432 = 8*3*11*13. The largest square divisor is 4, squarefree part is 858. So a(14) = gcd(4,858) = 2.
%t Table[GCD[First@ Select[Reverse@ Divisors@ #, IntegerQ@ Sqrt@ # &], Times @@ Power @@@ Map[{#1, Mod[#2, 2]} & @@ # &, FactorInteger@ #]] &@ Binomial[n, Floor[n/2]], {n, 80}] (* _Michael De Vlieger_, Feb 18 2017, after _Zak Seidov_ at A007913 *)
%o (PARI)
%o A001405(n) = binomial(n, n\2);
%o A055229(n) = { my(c=core(n)); gcd(c, n/c); } \\ _Charles R Greathouse IV_, Nov 20 2012
%o A056059(n) = A055229(A001405(n)); \\ _Antti Karttunen_, Jul 20 2017
%o (Python)
%o from sympy import binomial, gcd
%o from sympy.ntheory.factor_ import core
%o def a001405(n): return binomial(n, n//2)
%o def a055229(n):
%o c = core(n)
%o return gcd(c, n//c)
%o def a(n): return a055229(a001405(n))
%o print([a(n) for n in range(1, 151)]) # _Indranil Ghosh_, Jul 20 2017
%Y Cf. A000188, A001405, A007913, A008833, A034974, A046098, A055229, A055231.
%Y Cf. A056056, A056057, A056058, A056060, A056061.
%Y A056201 is the cube of this sequence.
%K nonn
%O 1,14
%A _Labos Elemer_, Jul 26 2000
%E Formula clarified by _Antti Karttunen_, Jul 20 2017