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.

Showing 1-3 of 3 results.

A301278 Numerator of variance of n-th row of Pascal's triangle.

Original entry on oeis.org

0, 0, 1, 4, 47, 244, 1186, 1384, 25147, 112028, 98374, 1067720, 1531401, 39249768, 166656772, 88008656, 2961699667, 12412521388, 51854046982, 108006842264, 448816369361, 3721813363288, 15401045060572, 15904199160592, 131178778841711, 1080387930269464, 4443100381114156, 9124976352166288
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2018

Keywords

Comments

Variance here is the sample variance unbiased estimator. For population variance, see A301631.

Examples

			The first few variances are 0, 0, 1/3, 4/3, 47/10, 244/15, 1186/21, 1384/7, 25147/36, 112028/45, 98374/11, 1067720/33, 1531401/13, 39249768/91, 166656772/105, 88008656/15, 2961699667/136, 12412521388/153, 51854046982/171, 108006842264/95, 448816369361/105, ...
		

Crossrefs

Mean and variance of n-th row of Pascal's triangle: A084623/A000265, A301278/A301279, A054650, A301280.

Programs

  • Maple
    M:=70;
    m := n -> 2^n/(n+1);
    m1:=[seq(m(n),n=0..M)]; # A084623/A000265
    v := n -> (1/n) * add((binomial(n,i) - m(n))^2, i=0..n );
    v1:= [0, 0, seq(v(n),n=2..60)]; # A301278/A301279
  • PARI
    a(n) = if(n==0, 0, numerator(binomial(2*n,n)/n - 4^n/(n*(n+1)))); \\ Altug Alkan, Mar 25 2018
  • Python
    from fractions import Fraction
    from sympy import binomial
    def A301278(n):
        return (Fraction(int(binomial(2*n,n)))/n - Fraction(4**n)/(n*(n+1))).numerator if n > 0 else 0 # Chai Wah Wu, Mar 23 2018
    

Formula

a(0) = 0; a(n) = numerator of binomial(2n,n)/n - 4^n/(n*(n+1)) for n >= 1. - Chai Wah Wu, Mar 23 2018

A301280 Nearest integer to variance of n-th row of Pascal's triangle.

Original entry on oeis.org

0, 0, 0, 1, 5, 16, 56, 198, 699, 2490, 8943, 32355, 117800, 431316, 1587207, 5867244, 21777203, 81127591, 303240041, 1136914129, 4274441613, 16111746161, 60873695892, 230495640009, 874525192278, 3324270554675, 12658405644200, 48280298159610
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2018

Keywords

Examples

			The first few variances are 0, 0, 1/3, 4/3, 47/10, 244/15, 1186/21, 1384/7, 25147/36, 112028/45, 98374/11, 1067720/33, 1531401/13, 39249768/91, 166656772/105, 88008656/15, 2961699667/136, 12412521388/153, 51854046982/171, 108006842264/95, 448816369361/105, ...
		

Crossrefs

Mean and variance of n-th row of Pascal's triangle: A084623/A000265, A301278/A301279, A054650.

Programs

  • Maple
    M:=70;
    m := n -> 2^n/(n+1);
    m1:=[seq(m(n),n=0..M)]; # A084623/A000265
    v := n -> (1/n) * add((binomial(n,i) - m(n))^2, i=0..n );
    v1:= [0, 0, seq(v(n),n=2..60)]; # A301278/A301279 and A301280
    # Alternative:
    f:= n -> round((binomial(2*n,n)-4^n/(n+1))/n): f(0):=0:
    map(f, [$0..60]); # Robert Israel, Jul 18 2019

Formula

From Robert Israel, Jul 18 2019: (Start)
The variance is binomial(2*n,n)/n - 4^n/(n*(n+1)).
a(n) ~ 4^n/(sqrt(Pi)*n^(3/2)). (End)

A301631 Numerator of population variance of n-th row of Pascal's triangle.

Original entry on oeis.org

0, 0, 2, 1, 94, 122, 2372, 173, 50294, 56014, 983740, 266930, 18376812, 19624884, 333313544, 5500541, 5923399334, 6206260694, 103708093964, 27001710566, 1795265477444, 1860906681644, 30802090121144, 1988024895074, 524715115366844, 540193965134732, 8886200762228312
Offset: 0

Views

Author

N. J. A. Sloane and Chai Wah Wu, Mar 24 2018

Keywords

Comments

Denominator of population variance of n-th row of Pascal's triangle is A191871(n+1) = A000265(n+1)^2.

Examples

			The first few population variances are 0, 0, 2/9, 1, 94/25, 122/9, 2372/49, 173, 50294/81, 56014/25, 983740/121, 266930/9, 18376812/169, 19624884/49, 333313544/225, 5500541, 5923399334/289, ...
		

Crossrefs

Programs

  • PARI
    a(n) = numerator(binomial(2*n,n)/(n+1) - 4^n/(n+1)^2); \\ Altug Alkan, Mar 25 2018
  • Python
    from fractions import Fraction
    from sympy import binomial
    def A301631(n):
        return (Fraction(int(binomial(2*n,n)))/(n+1) - Fraction(4**n)/(n+1)**2).numerator
    

Formula

a(n) = numerator of binomial(2n,n)/(n+1) - 4^n/(n+1)^2.
a(n) = A000108(n)*A000265(n+1)^2 - A075101(n+1)^2/4.
Showing 1-3 of 3 results.