A101879 a(0) = 1, a(1) = 1, a(2) = 2; for n > 2, a(n) = 5*a(n-1) - 5*a(n-2) + a(n-3).
1, 1, 2, 6, 21, 77, 286, 1066, 3977, 14841, 55386, 206702, 771421, 2878981, 10744502, 40099026, 149651601, 558507377, 2084377906, 7779004246, 29031639077, 108347552061, 404358569166, 1509086724602, 5631988329241, 21018866592361, 78443478040202, 292755045568446
Offset: 0
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..1750
- Reid Barton, A combinatorial interpretation of the sequence 1, 1, 2, 6, 21, 77, ...
- Reid Barton, A combinatorial interpretation of the sequence 1, 1, 2, 6, 21, 77, ..., [Annotated scanned copy]
- Index entries for linear recurrences with constant coefficients, signature (5,-5,1).
Programs
-
Magma
I:=[1,1,2]; [n le 3 select I[n] else 5*Self(n-1)-5*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 18 2015
-
Mathematica
LinearRecurrence[{5, -5, 1}, {1, 1, 2}, 30] (* Vincenzo Librandi, Sep 18 2015 *) CoefficientList[Series[(1 - 4 x + 2 x^2)/((1 - x) (1 - 4 x + x^2)), {x, 0, 27}], x] (* Michael De Vlieger, Aug 11 2016 *) a[ n_] := If[ n < 1, a[1 - n], SeriesCoefficient[ (1/(1 - x) + (1 - 3 x)/(1 - 4 x + x^2)) / 2, {x, 0, n}]]; (* Michael Somos, Jul 09 2017 *)
-
PARI
M=[1,1,0; 1,3,1; 0,1,1]; for(i=0,40,print1((M^i)[1,1],","))
-
PARI
{a(n) = if( n<1, a(1-n), polcoeff( (1/(1 - x) + (1 - 3*x)/(1 - 4*x + x^2)) / 2 + x * O(x^n), n))}; /* Michael Somos, Jul 09 2017 */
Formula
a(n) = A101265(n), n>0. - R. J. Mathar, Aug 30 2008
a(0) = a(1) = 1, for n>1 a(n) = (a(n-1) + a(n-1)^2) / a(n-2). - Seiichi Manyama, Aug 11 2016
From Ilya Gutkovskiy, Aug 11 2016: (Start)
G.f.: (1 - 4*x + 2*x^2)/((1 - x)*(1 - 4*x + x^2)).
a(n) = (6+(3-sqrt(3))*(2+sqrt(3))^n + (2-sqrt(3))^n*(3+sqrt(3)))/12. (End)
a(n) = 4*a(n-1) - a(n-2) - 1. - Seiichi Manyama, Aug 26 2016
From Seiichi Manyama, Sep 03 2016: (Start)
a(n) = (a(n-1) + 1)*(a(n-2) + 1) / a(n-3).
From Michael Somos, Jul 09 2017: (Start)
0 = +a(n)*(+1 +a(n) -4*a(n+1)) +a(n+1)*(+1 +a(n+1)) for all n in Z.
a(n) = a(1 - n) = (1 + A001835(n)) / 2 for all n in Z. (End)
Extensions
a(26)-a(27) from Vincenzo Librandi, Sep 18 2015
Comments