OFFSET
1,2
COMMENTS
This is equivalent to the Pell equation B(n)^2 - 10*A(n)^2 = -9 with
a(n) = (A(n)+1)/2, b(n) = (B(n)+7)/2, and the 3 fundamental solutions
(1,1), (9,3), (41,13), and the solution (19,6) for the unit form.
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).
FORMULA
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)).
a(n+9) = 39*a(n+6) - 39*a(n+3) + a(n).
Let r = sqrt(10), then:
a(3*n+1) = (20 + (10+r)*(19+6*r)^n + (10-r)*(19-6*r)^n)/40.
a(3*n+2) = (20 + (30+9*r)*(19+6*r)^n + (30-9*r)*(19-6*r)^n)/40.
a(3*n+3) = (20 + (130+41*r)*(19+6*r)^n + (130-41*r)*(19-6*r)^n)/40.
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
EXAMPLE
For n=3: a(3)=7, b(3)=24, binomial(7,2)*binomial(24,3) = binomial(24,5) = 42504.
MATHEMATICA
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 *)
PROG
(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
(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
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Weisenhorn, Aug 05 2010
EXTENSIONS
Edited by G. C. Greubel, Mar 21 2019
STATUS
approved