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 A082291 #27 Aug 13 2017 17:42:46 %S A082291 2,19,118,695,4058,23659,137902,803759,4684658,27304195,159140518, %T A082291 927538919,5406093002,31509019099,183648021598,1070379110495, %U A082291 6238626641378,36361380737779,211929657785302,1235216565974039 %N A082291 Expansion of x(2 + 5x - x^2)/((1 - x)(1 - 6x + x^2)). %C A082291 Integers n such that (n+1)^2 + (n+2)^2 is a square. %C A082291 From _Paul Weisenhorn_, Aug 03 2010: (Start) %C A082291 Place a(n) red and 2 blue balls in an urn; draw b(n) = A001109(n) balls without replacement; %C A082291 2*probability(b(n) red balls) = probability(b(n) balls); this is equivalent to the Pell equation A(n)^2 - 8*B(n)^2 = 1 with a(n) = (A(n) + 4*B(n) - 3)/2; b(n) = B(n); and the solution (3;1) for the unit form. (End) %H A082291 <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a> %H A082291 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7, -7, 1). %F A082291 G.f.: x(2+5x-x^2)/((1-x)(1-6x+x^2)). %F A082291 a(n) = 6a(n-1) - a(n-2) + 6. %F A082291 a(-1-n) = -3 - a(n). %F A082291 A001109(n+1) + A001109(n) = 2a(n)+3, a(n+1) = 7a(n) - 4*A001109(n) + 9. - Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de) %F A082291 From _Paul Weisenhorn_, Aug 03 2010: (Start) %F A082291 a(n) = round(((3 + sqrt(8))^n*(1 + sqrt(2)) - 6)/4); %F A082291 b(n) = round((sqrt(2)*(3+sqrt(8))^n)/8)=A001109(n); %F A082291 a(n+3) = 7*(a(n+2) - a(n+1)) + a(n); %F A082291 (End) %F A082291 a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3) with a(1)=2, a(2)=19, and a(3)=118. - _Harvey P. Dale_, Jul 19 2012 %e A082291 For n=3: a(3)=118; b(3)=35; 2*binomial(118,35) = binomial(120,35). - _Paul Weisenhorn_, Aug 03 2010 %e A082291 2*x + 19*x^2 + 118*x^3 + 695*x^4 + 4058*x^5 + 23659*x^6 + ... %p A082291 for n from 1 to 20 do a[n]:=round((3+sqrt(8))^n*(1+sqrt(2))-6)/4): end do: # _Paul Weisenhorn_, Aug 03 2010 %t A082291 Rest[CoefficientList[Series[x (2+5x-x^2)/((1-x)(1-6x+x^2)),{x,0,20}],x]] (* or *) LinearRecurrence[{7,-7,1},{2,19,118},20] (* _Harvey P. Dale_, Jul 19 2012 *) %o A082291 (PARI) {a(n) = if( n<0, -3 - a(-1 - n), if( n==0, -1, polcoeff( x * (2 + 5*x -x^2) / ((1 - x) * (1 - 6*x + x^2)) + x*O(x^n), n)))} %o A082291 (PARI) {a(n) = subst( poltchebi(n+1) - poltchebi(n) - 6, x, 3)/4} %Y A082291 Cf. A001652(n) = a(n) + 1. %Y A082291 b(n) = A001109(n). - _Paul Weisenhorn_, Aug 03 2010 %K A082291 nonn,easy %O A082291 1,1 %A A082291 _Michael Somos_, Apr 07 2003