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-5 of 5 results.

A014088 Minimal number of people to give a 50% probability of having at least n coincident birthdays in one year.

Original entry on oeis.org

1, 23, 88, 187, 313, 460, 623, 798, 985, 1181, 1385, 1596, 1813, 2035, 2263, 2494, 2730, 2970, 3213, 3459, 3707, 3959, 4213, 4470, 4728, 4989, 5252, 5516, 5783, 6051, 6320, 6592, 6864, 7138, 7413, 7690, 7968, 8247, 8527, 8808, 9090, 9373, 9657, 9942, 10228
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033810 (2 people on n days), A225852 (3 people on n days), A225871 (4 people on n days).

Programs

  • Mathematica
    q[1][n_, d_] := q[1][n, d] = d!/((d-n)!*d^n) // N; q[k_][n_, d_] := q[k][n, d] = Sum[ n!*d!/(d^(i* k)*i!*(k!)^i*(n-i*k)!*(d-i)!)*Sum[ q[j][n-i*k, d-i]*(d-i)^(n-i* k)/d^(n-i*k), {j, 1, k-1}], {i, 1, Floor[n/k]}] // N; p[k_][n_, d_] := 1 - Sum[q[i][n, d], {i, 1, k-1}]; a[1] = 1; a[k_] := a[k] = For[n = a[k-1], True, n++, If[p[k][n, 365] >= 1/2, Return[n]]]; Table[ Print["a(", k, ") = ", a[k]]; a[k], {k, 1, 15}] (* Jean-François Alcover, Jun 12 2013, after Eric W. Weisstein *)

Extensions

Broken links corrected by Steven Finch, Jan 27 2009
a(16)-a(45) from Hiroaki Yamanouchi, Mar 19 2015

A033810 Number of people needed so that probability of at least two sharing a birthday out of n possible days is at least 50%.

Original entry on oeis.org

2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12
Offset: 1

Views

Author

Keywords

Comments

a(365) = 23 is the solution to the Birthday Problem.

Crossrefs

Essentially the same as A088141. See also A182008, A182009, A182010.
Cf. A014088 (n people on 365 days), A225852 (3 on n days), A225871 (4 people on n days).
Cf. A380129 (Strong Birthday Problem).

Programs

  • Mathematica
    lst = {}; s = 1; Do[Do[If[Product[(n - i + 1)/n, {i, j}] <= 1/2, If[j > s, s = j]; AppendTo[lst, j]; Break[]], {j, s, s + 1}], {n, 86}]; lst (* Arkadiusz Wesolowski, Apr 29 2012 *)
    A033810[n_] := Catch@Do[If[1/2 >= n!/(n - m)!/n^m, Throw[m]], {m, 2, Infinity}]; Array[A033810, 86] (* JungHwan Min, Mar 27 2017 *)
  • Python
    from math import comb, factorial
    def A033810(n):
        def p(m): return comb(n,m)*factorial(m)<<1
        kmin, kmax = 0, 1
        while p(kmax) > n**kmax: kmax<<=1
        while kmax-kmin > 1:
            kmid = kmax+kmin>>1
            if p(kmid) <= n**kmid:
                kmax = kmid
            else:
                kmin = kmid
        return kmax # Chai Wah Wu, Jan 21 2025

Formula

a(n) = ceiling(sqrt(2*n*log(2)) + (3 - 2*log(2))/6 + (9 - 4*log(2)^2) / (72*sqrt(2*n*log(2))) - 2*log(2)^2/(135*n)) for all n up to 10^18. It is conjectured that this formula holds for all n.

A225852 The number of people required for there to be at least a 50% chance that at least 3 share a birthday in a year with n days.

Original entry on oeis.org

3, 4, 5, 6, 7, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29, 30, 30
Offset: 1

Views

Author

Keywords

Comments

a(365) = 88.
For n <= 1000, a(n) = 1.436 + 1.812*n^0.654 - 0.817/n^3 provides an estimate accurate to 0.6 units.

Examples

			The probability that out of 87 people 3 share a birthday in a year with 365 days is 0.4994549. The corresponding probability for 88 people is 0.5110651. Therefore a(365)=88.
		

Crossrefs

Cf. A014088 (n people on 365 days), A033810 (2 people on n days), A225871 (4 people on n days).

Programs

  • R
    library(gmp);#prob of a maximum of exactly k coincident birthdays is
    BigQ<-function(nday,p,k) { #nday=days in a year; p=people
        if(p1,sum(sapply(2:k-1,function(j) BigQ(nday-i,p-k*i,j))),1)
        }
        tot
    }
    BDaySharedByAtLeast<-function(nday,people,k) {
        if(nday<1 | people
    				

A225871 Number of people required for there to be a 50% probability that at least 4 share a birthday in a year with n days.

Original entry on oeis.org

4, 6, 7, 9, 10, 11, 12, 13, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 28, 29, 30, 31, 32, 32, 33, 34, 34, 35, 36, 37, 37, 38, 39, 39, 40, 41, 41, 42, 43, 43, 44, 45, 45, 46, 46, 47, 48, 48, 49, 50, 50, 51, 51, 52, 53, 53, 54, 54, 55, 56
Offset: 1

Views

Author

Keywords

Comments

a(365)=187.
For n<1000, the formula a(n) = 2.79 + 2.456*n^0.732 - 1.825/n provides an estimate of a(n) accurate to 0.82.

Examples

			For a year with 365 days, a(365), the probability that out of 186 people 4 of them share a birthday is 0.495825. The corresponding probability for 187 people is 0.502685, and therefore a(365)=187.
		

Crossrefs

Cf. A014088 (n people on 365 days), A033810 (2 people on n days), A225852 (3 on n days).

Programs

  • R
    library(gmp);#prob of a maximum of exactly k coincident birthdays is
    BigQ<-function(nday,p,k) { #nday=days in a year; p=people
        if(p1,sum(sapply(2:k-1,function(j) BigQ(nday-i,p-k*i,j))),1)
        }
        tot
    }
    BDaySharedByAtLeast<-function(nday,people,k) {
        if(nday<1 | people
    				

A109901 a(n) = binomial(n^2, n*(n+1)/2).

Original entry on oeis.org

1, 1, 4, 84, 8008, 3268760, 5567902560, 39049918716424, 1118770292985239888, 130276394656770614583240, 61448471214136179596720592960, 117118180539414377821494470432491764, 900390992257782351906806257139068209113040, 27883369051325994219981405855549095749234579210080
Offset: 0

Views

Author

Amarnath Murthy, Jul 14 2005

Keywords

Comments

8*a(2*n+1)^4 = A182010(n) = number of potential group developed cocyclic Hadamard matrices over (the group) Z_{(2*n+1)^2} X Z^2_2 [Baliga, et al., p. 130]. - L. Edson Jeffery, Apr 10 2012

Examples

			a(6) = 36!/(21!*15!) = 5567902560.
		

Crossrefs

Cf. variants: A014062 (C(n^2,n*(n-1))), A135757 (C(n*(n+1),n*(n+1)/2)).
Cf. A182010.

Programs

  • Maple
    seq(binomial(n^2,n*(n+1)/2),n=0..12); # Emeric Deutsch, Jul 16 2005
  • Mathematica
    Table[Binomial[n^2,(n(n+1))/2],{n,20}] (* Harvey P. Dale, Jun 04 2011 *)
  • PARI
    a(n)=binomial(n^2,n*(n+1)/2)

Formula

a(n) = C(n^2, n*(n+1)/2) = (n^2!)/((n(n+1)/2)!*(n(n-1)/2)!).
a(n) = C(n^2, n*(n-1)/2).

Extensions

More terms from Emeric Deutsch, Jul 16 2005
Offset changed to 0 (with a(0)=1), and name changed slightly by Paul D. Hanna, Jun 24 2011
Terms a(12) and beyond from Andrew Howroyd, Nov 09 2019
Showing 1-5 of 5 results.