[go: up one dir, main page]

login
A082291
Expansion of x(2 + 5x - x^2)/((1 - x)(1 - 6x + x^2)).
2
2, 19, 118, 695, 4058, 23659, 137902, 803759, 4684658, 27304195, 159140518, 927538919, 5406093002, 31509019099, 183648021598, 1070379110495, 6238626641378, 36361380737779, 211929657785302, 1235216565974039
OFFSET
1,1
COMMENTS
Integers n such that (n+1)^2 + (n+2)^2 is a square.
From Paul Weisenhorn, Aug 03 2010: (Start)
Place a(n) red and 2 blue balls in an urn; draw b(n) = A001109(n) balls without replacement;
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)
FORMULA
G.f.: x(2+5x-x^2)/((1-x)(1-6x+x^2)).
a(n) = 6a(n-1) - a(n-2) + 6.
a(-1-n) = -3 - a(n).
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)
From Paul Weisenhorn, Aug 03 2010: (Start)
a(n) = round(((3 + sqrt(8))^n*(1 + sqrt(2)) - 6)/4);
b(n) = round((sqrt(2)*(3+sqrt(8))^n)/8)=A001109(n);
a(n+3) = 7*(a(n+2) - a(n+1)) + a(n);
(End)
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
EXAMPLE
For n=3: a(3)=118; b(3)=35; 2*binomial(118,35) = binomial(120,35). - Paul Weisenhorn, Aug 03 2010
2*x + 19*x^2 + 118*x^3 + 695*x^4 + 4058*x^5 + 23659*x^6 + ...
MAPLE
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
MATHEMATICA
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 *)
PROG
(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)))}
(PARI) {a(n) = subst( poltchebi(n+1) - poltchebi(n) - 6, x, 3)/4}
CROSSREFS
Cf. A001652(n) = a(n) + 1.
b(n) = A001109(n). - Paul Weisenhorn, Aug 03 2010
Sequence in context: A285791 A376481 A101253 * A055518 A289230 A350568
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Apr 07 2003
STATUS
approved