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.
%I A180003 #17 Sep 02 2023 20:07:38 %S A180003 1,2,7,13,56,247,475,2108,9361,18019,80030,355453,684229,3039014, %T A180003 13497835,25982665,115402484,512562259,986657023,4382255360, %U A180003 19463867989,37466984191,166410301178,739114421305,1422758742217,6319209189386 %N A180003 Place a(n) blue and b(n) (A180002) red balls in an urn, draw 5 balls without replacement; Probability(5 red balls) = Probability(3 red and 2 blue balls). %C A180003 This is equivalent to the Pell equation B(n)^2 - 10*A(n)^2 = -9 with %C A180003 a(n) = (A(n)+1)/2, b(n) = (B(n)+7)/2, and the 3 fundamental solutions %C A180003 (1,1), (9,3), (41,13), and the solution (19,6) for the unit form. %H A180003 G. C. Greubel, <a href="/A180003/b180003.txt">Table of n, a(n) for n = 1..1000</a> %H A180003 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,38,-38,0,-1,1). %F A180003 G.f.: x*(1 +x +5*x^2 -32*x^3 +5*x^4 +x^5 +x^6)/((1-x)*(1-38*x^3+x^6)). %F A180003 a(n+9) = 39*a(n+6) - 39*a(n+3) + a(n). %F A180003 Let r = sqrt(10), then: %F A180003 a(3*n+1) = (20 + (10+r)*(19+6*r)^n + (10-r)*(19-6*r)^n)/40. %F A180003 a(3*n+2) = (20 + (30+9*r)*(19+6*r)^n + (30-9*r)*(19-6*r)^n)/40. %F A180003 a(3*n+3) = (20 + (130+41*r)*(19+6*r)^n + (130-41*r)*(19-6*r)^n)/40. %F A180003 a(n) = a(n-1) + 38*a(n-3) - 38*a(n-4) - a(n-6) + a(n-7). - _G. C. Greubel_, Mar 21 2019 %e A180003 For n=3: a(3)=7, b(3)=24, binomial(7,2)*binomial(24,3) = binomial(24,5) = 42504. %t A180003 Rest[CoefficientList[Series[x*(1+x+5*x^2-32*x^3+5*x^4+x^5+x^6)/((1-x)*( 1-38*x^3+x^6)), {x,0,30}], x]] (* _G. C. Greubel_, Mar 20 2019 *) %o A180003 (PARI) my(x='x+O('x^30)); Vec(x*(1+x+5*x^2-32*x^3+5*x^4+x^5+x^6)/((1-x) *(1-38*x^3+x^6))) \\ _G. C. Greubel_, Mar 21 2019 %o A180003 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x*(1+x+5*x^2-32*x^3+5*x^4+x^5+x^6)/((1-x)*(1-38*x^3+x^6)) )); // _G. C. Greubel_, Mar 21 2019 %o A180003 (Sage) a=(x*(1+x+5*x^2-32*x^3+5*x^4+x^5+x^6)/((1-x)*(1-38*x^3+x^6)) ).series(x, 30).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Mar 21 2019 %Y A180003 Cf. A180002 (b(n)). %K A180003 nonn %O A180003 1,2 %A A180003 _Paul Weisenhorn_, Aug 05 2010 %E A180003 Edited by _G. C. Greubel_, Mar 21 2019