OFFSET
0,2
COMMENTS
a(n) is also the largest integer such that 2^a(n) divides binomial(10n, 5n). - Benoit Cloitre, Mar 27 2002
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..10000
Michael Gilleland, Some Self-Similar Integer Sequences.
FORMULA
a(n) = floor(log(gcd(binomial(10*n, 5*n), 2^floor(log(binomial(10*n, 5*n))/log(2))))/log(2)). - Benoit Cloitre, Mar 27 2002
a(n) = A000120(5*n). - Indranil Ghosh, Jan 18 2017
EXAMPLE
For n = 10, 5*n = 50 = 110010_2, having 3 1's. So, a(10) = 3. - Indranil Ghosh, Jan 18 2017
MATHEMATICA
a[n_] := DigitCount[5*n, 2, 1]; Array[a, 100, 0] (* Amiram Eldar, Jul 18 2023 *)
PROG
(Python)
def A046820(n):
....return bin(5*n)[2:].count("1") # Indranil Ghosh, Jan 18 2017
(PARI) a(n) = hammingweight(5*n); \\ Michel Marcus, Aug 19 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved