|
|
A177424
|
|
Exponent of the highest power of 2 dividing binomial(n^2,n).
|
|
1
|
|
|
0, 0, 1, 2, 2, 1, 4, 3, 3, 1, 3, 3, 2, 3, 5, 4, 4, 1, 3, 3, 5, 1, 4, 8, 3, 2, 3, 5, 6, 4, 6, 5, 5, 1, 3, 3, 5, 2, 6, 3, 3, 3, 4, 3, 4, 4, 5, 6, 4, 2, 3, 7, 5, 1, 5, 5, 3, 4, 6, 6, 7, 5, 7, 6, 6, 1, 3, 3, 5, 2, 6, 4, 7, 1, 3, 3, 3, 5, 6, 4, 4, 2, 6, 3, 5, 5, 4, 6, 6, 2, 4, 12, 6, 5, 6, 7, 5, 2, 3, 6, 5, 3, 6, 3, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
a(n) is the largest integer such that 2^a(n) divides binomial(n^2,n)=A014062(n).
a(n) is the number of carries when adding n to n^2-n in base 2. - Robert Israel, Oct 23 2019
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 6, binomial(36,6) = 1947792 = 2^4*3*7*11*17*31, the highest power of 2 is 2^4, and the exponent of 2^4 is a(6)=4.
|
|
MAPLE
|
A007814 := proc(n) if type(n, 'odd') then 0; else for p in ifactors(n)[2] do if op(1, p) = 2 then return op(2, p); end if; end do: end if; end proc:
A014062 := proc(n) binomial(n^2, n) ; end proc:
# Alternative:
nc:= proc(a, b, c)
local t;
if c=0 and (a=0 or b=0) then return 0 fi;
t:= (a mod 2) + (b mod 2) + c;
if t < 2 then procname(floor(a/2), floor(b/2), 0)
else 1 + procname(floor(a/2), floor(b/2), 1)
fi
end proc:
|
|
MATHEMATICA
|
IntegerExponent[Table[Binomial[n^2, n], {n, 0, 120}], 2] (* Harvey P. Dale, Mar 31 2019 *)
|
|
PROG
|
(Python)
from math import comb
(PARI) valp(n, p=2)=my(s); while(n\=p, s+=n); s
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Maple program replaced by a structured general version - R. J. Mathar, May 10 2010
|
|
STATUS
|
approved
|
|
|
|