cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A177424 Exponent of the highest power of 2 dividing binomial(n^2,n).

Original entry on oeis.org

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
Offset: 0

Views

Author

Michel Lagneau, May 07 2010

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • 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:
    A177424 := proc(n) A007814(A014062(n)) ; end proc: seq(A177424(n),n=0..80) ;
    # 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:
    seq(nc(n,n^2-n,0),n=0..100); # Robert Israel, Oct 23 2019
  • Mathematica
    IntegerExponent[Table[Binomial[n^2,n],{n,0,120}],2] (* Harvey P. Dale, Mar 31 2019 *)
  • PARI
    valp(n,p=2)=my(s); while(n\=p, s+=n); s
    a(n)=valp(n^2)-valp(n^2-n)-valp(n) \\ Charles R Greathouse IV, Jul 08 2022
  • Python
    from math import comb
    def A177424(n): return (~(m:=comb(n**2,n))& m-1).bit_length() # Chai Wah Wu, Jul 08 2022
    

Formula

a(n) = A007814(A014062(n)).

Extensions

Maple program replaced by a structured general version - R. J. Mathar, May 10 2010