OFFSET
1,1
COMMENTS
These numbers have a simple binary pattern: 10,1100,110100,11010100,1101010100, ... i.e., the n-th term has a binary expansion 1(10){n-1}0, that is, there are n-1 10's between the most significant 1 and the least significant 0. - Antti Karttunen, Sep 14 2006
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..170
Andrei Asinowski, Cyril Banderier, and Benjamin Hackl, On extremal cases of pop-stack sorting, Permutation Patterns (Zürich, Switzerland, 2019).
Index entries for linear recurrences with constant coefficients, signature (5,-4).
FORMULA
a(n) = 5*a(n-1) - 4*a(n-2), with a(1)=2, a(2)=12. - Harvey P. Dale, Oct 16 2012
From Elmo R. Oliveira, Mar 07 2026: (Start)
a(n) = 2*A020989(n-1).
G.f.: 2*x*(x+1)/((x-1)*(4*x-1)).
E.g.f.: (3 - 8*exp(x) + 5*exp(4*x))/6. (End)
MATHEMATICA
(5*4^Range[30]-8)/6 (* or *) LinearRecurrence[{5, -4}, {2, 12}, 30] (* Harvey P. Dale, Oct 16 2012 *)
PROG
(Magma) [(5*4^n-8)/6: n in [1..40]]; // Vincenzo Librandi, Apr 28 2011
(PARI) a(n)=(5*4^n-8)/6 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 02 2003
STATUS
approved
