OFFSET
1,2
COMMENTS
Twice the Pell numbers; for denominators see A001333 (numerators of the approximation of sqrt(2) for a(1) = 1).
Row sums of the triangle A128966. - Reinhard Zumkeller, Jul 20 2013
Because a(n+1)/A001333(n) approximates sqrt(2) and a(n) = 2*A001333(n) - a(n+1), we get that a(n)/A001333(n) approximates 2 - sqrt(2). - Danny Rorabaugh, Mar 14 2015
Number of weak orderings R on {1,...,n} that are weakly single-peaked w.r.t. the total ordering 1 < ... < n and for which {1,...,n} has exactly one minimal and one maximal element for the weak ordering R. - J. Devillet, Sep 28 2017
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
M. Couceiro, J. Devillet, and J.-L. Marichal, Quasitrivial semigroups: characterizations and enumerations, arXiv:1709.09162 [math.RA], 2017.
I. M. Gessel, Ji Li, Compositions and Fibonacci identities, J. Int. Seq. 16 (2013) 13.4.5.
Tian-Xiao He, Peter J.-S. Shiue, Zihan Nie, Minghao Chen, Recursive sequences and Girard-Waring identities with applications in sequence transformation, Electronic Research Archive (2020) Vol. 28, No. 2, 1049-1062.
Index entries for linear recurrences with constant coefficients, signature (2,1).
FORMULA
a(n) = A052542(n-1), n > 1.
G.f.: x + x^2/(2*G(0)-x) where G(k) = 1 - (k+1)/(1 - x/(x +(k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 07 2012
a(n) = 2*a(n-1) + a(n-2). - Jacob Antony, Jun 07 2013
a(n) = b(n) - b(n-1) = 2b(n-1) - a(n-1) where b(n) = A001333(n). - Danny Rorabaugh, Mar 14 2015
G.f.: 2*t^2/(1 - 2*t - t^2). - G. C. Greubel, Dec 12 2016
a(n) = 2*A000129(n-1) (see the first comment). - J. Devillet, Sep 28 2017
MAPLE
A163271:=gfun:-rectoproc({a(n) = 2 * a(n-1) + a(n-2), a(1) = 0, a(2) = 2}, a(n), remember): map(A163271, [$1..100]); # Muniru A Asiru, Oct 08 2017
MATHEMATICA
CoefficientList[Series[2*t^2/(1-2*t - t^2), {t, 0, 50}], t] (* or *) LinearRecurrence[{2, 1}, {0, 2}, 50] (* G. C. Greubel, Dec 12 2016 *)
PROG
(Haskell)
a163271 = sum . a128966_row . (subtract 1)
-- Reinhard Zumkeller, Jul 20 2013
(PARI) concat([0], Vec(2*t^2/(1-2*t - t^2) + O(t^50))) \\ G. C. Greubel, Dec 12 2016
(GAP)
a := [0, 2];; for n in [3..10^2] do a[n] := 2*a[n-1] + a[n-2]; od; A163271:=a; # Muniru A Asiru, Oct 08 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Mark Dols, Jul 24 2009
STATUS
approved