A056059 GCD of largest square and squarefree part of central binomial coefficients.
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, 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, 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
Offset: 1
Keywords
Examples
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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
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 *)
-
PARI
A001405(n) = binomial(n, n\2); A055229(n) = { my(c=core(n)); gcd(c, n/c); } \\ Charles R Greathouse IV, Nov 20 2012 A056059(n) = A055229(A001405(n)); \\ Antti Karttunen, Jul 20 2017
-
Python
from sympy import binomial, gcd from sympy.ntheory.factor_ import core def a001405(n): return binomial(n, n//2) def a055229(n): c = core(n) return gcd(c, n//c) def a(n): return a055229(a001405(n)) print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Jul 20 2017
Extensions
Formula clarified by Antti Karttunen, Jul 20 2017
Comments