login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A057815
a(n) = gcd(n,binomial(n,floor(n/2))).
2
1, 2, 3, 2, 5, 2, 7, 2, 9, 2, 11, 12, 13, 2, 15, 2, 17, 2, 19, 4, 21, 2, 23, 4, 25, 2, 27, 4, 29, 30, 31, 2, 33, 2, 35, 12, 37, 2, 39, 20, 41, 6, 43, 4, 45, 2, 47, 12, 49, 2, 51, 4, 53, 2, 55, 56, 57, 2, 59, 4, 61, 2, 63, 2, 65, 6, 67, 4, 69, 14, 71, 4, 73, 2, 75, 4, 77, 2, 79, 20, 81, 2
OFFSET
1,2
COMMENTS
For even n, a(n) is an even divisor of n.
LINKS
FORMULA
a(2k+1) = 2k+1. a(2k) = A058005(k).
MAPLE
swing := n -> n!/iquo(n, 2)!^2: seq(igcd(n, swing(n)), n=1..82); # Peter Luschny, May 17 2013
MATHEMATICA
a[n_] := GCD[n, Binomial[n, Floor[n/2]]]; Array[a, 100] (* Jean-François Alcover, Jun 03 2019 *)
PROG
(PARI) a(n) = gcd(n, binomial(n, n\2)); \\ Michel Marcus, Mar 22 2020
CROSSREFS
Sequence in context: A007389 A007388 A348846 * A007387 A105222 A280503
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 13 2000
EXTENSIONS
Offset changed to 1 by Peter Luschny, May 17 2013
STATUS
approved