A180002 Place a(n) red and b(n) blue balls in an urn; draw 5 balls without replacement; Probability(5 red balls) = Probability(3 red and 2 blue balls).
4, 8, 24, 43, 179, 783, 1504, 6668, 29604, 56983, 253079, 1124043, 2163724, 9610208, 42683904, 82164403, 364934699, 1620864183, 3120083464, 13857908228, 61550154924, 118481007103, 526235577839, 2337285022803, 4499158186324, 19983094049528
Offset: 1
Keywords
Examples
For n=3: a(3)=24 and b(3)=7 since binomial(24,5) = binomial(24,3)*binomial(7,2) = 42504.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,38,-38,0,-1,1).
Crossrefs
Cf. A180003 (b(n)).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x*(4+4*x+ 16*x^2-133*x^3-16*x^4-4*x^5+3*x^6)/((1-x)*(1-38*x^3+x^6)) )); // G. C. Greubel, Mar 20 2019 -
Mathematica
Rest[CoefficientList[Series[x*(4+4*x+16*x^2-133*x^3-16*x^4-4*x^5 +3*x^6 )/((1-x)*(1-38*x^3+x^6)), {x,0,30}], x]] (* G. C. Greubel, Mar 20 2019 *) LinearRecurrence[{1,0,38,-38,0,-1,1},{4,8,24,43,179,783,1504},30] (* Harvey P. Dale, May 04 2024 *)
-
PARI
my(x='x+O('x^30)); Vec(x*(4+4*x+16*x^2-133*x^3-16*x^4-4*x^5+3*x^6) /((1-x)*(1-38*x^3+x^6))) \\ G. C. Greubel, Mar 20 2019
-
Sage
a=(x*(4+4*x+16*x^2-133*x^3-16*x^4-4*x^5+3*x^6)/((1-x)*(1-38*x^3 +x^6))).series(x, 30).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Mar 20 2019
Formula
G.f.: x*(4 +4*x +16*x^2 -133*x^3 -16*x^4 -4*x^5 +3*x^6)/((1-x)*(1 -38*x^3 +x^6)).
a(n+9) = 39*a(n+6) - 39*a(n+3) + a(n).
Let r = sqrt(10) then:
a(3*n+1) = (14 + (1+r)*(19+6*r)^n + (1-r)*(19-6*r)^n)/4.
a(3*n+2) = (14 + 3*(3+r)*(19+6*r)^n + 3*(3-r)*(19-6*r)^n)/4.
a(3*n+3) = (14 + (41+13*r)*(19+6*r)^n + (41-13*r)*(19-6*r)^n)/4.
a(n) = a(n-1) + 38*a(n-3) - 38*a(n-4) - a(n-6) + a(n-7). - G. C. Greubel, Mar 20 2019
Comments