OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..950
S. Barbero, U. Cerruti, and N. Murru, On polynomial solutions of the Diophantine equation (x + y - 1)^2 = wxy, Rendiconti Sem. Mat. Univ. Pol. Torino (2020) Vol. 78, No. 1, 5-12.
Index entries for linear recurrences with constant coefficients, signature (12,-12,1).
FORMULA
a(n) = 2*(T(n, 11/2) - 1)/9 with twice Chebyshev's polynomials of the first kind evaluated at x=11/2: 2*T(n, 11/2) = A057076(n) = ((11 + sqrt(117))^n + (11 - sqrt(117))^n)/2^n.
a(n) = 11*a(n-1) - a(n-2) + 2, n >= 2, a(0)=0, a(1)=1.
a(n) = 12*a(n-1) - 12*a(n-2) + a(n-3), n >= 3, a(0)=0, a(1)=1, a(2)=13.
G.f.: x*(1+x)/((1-x)*(1-11*x+x^2)) = x*(1+x)/(1-12*x+12*x^2-x^3) (from the Stephan link, see A092184).
MATHEMATICA
LinearRecurrence[{12, -12, 1}, {0, 1, 13}, 30] (* Harvey P. Dale, May 11 2012 *)
RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == 11 a[n-1] - a[n-2] + 2}, a, {n, 30}] (* Vincenzo Librandi, Mar 06 2016 *)
PROG
(PARI) concat(0, Vec(x*(1+x)/((1-x)*(1-11*x+x^2)) + O(x^25))) \\ Colin Barker, Mar 06 2016
(Magma) [n le 2 select n-1 else 11*Self(n-1)- Self(n-2) + 2: n in [1..30]]; // Vincenzo Librandi, Mar 06 2016
(Sage) (x*(1+x)/((1-x)*(1-11*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 24 2019
(GAP) a:=[0, 1, 13];; for n in [4..30] do a[n]:=12*a[n-1]-12*a[n-2]+ a[n-3]; od; a; # G. C. Greubel, May 24 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Oct 18 2004
STATUS
approved