OFFSET
0,1
COMMENTS
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (7,-14,8).
FORMULA
a(n) = 4^(n+1)-2^n-1 = A171499(n)-1.
G.f.: ( -2+x+4*x^2 ) / ( (x-1)*(2*x-1)*(4*x-1) ). - R. J. Mathar, Apr 09 2011
a(0)=2, a(1)=13, a(2)=59, a(n)=7*a(n-1)-14*a(n-2)+8*a(n-3). - Harvey P. Dale, Feb 25 2013
EXAMPLE
Binary values of the first 7 terms are 10, 1101, 111011, 11110111, 1111101111, 111111011111, 11111110111111.
MATHEMATICA
Table[4^(n+1)-2^n-1, {n, 0, 30}] (* or *) LinearRecurrence[{7, -14, 8}, {2, 13, 59}, 30] (* Harvey P. Dale, Feb 25 2013 *)
PROG
(PARI) a(n)=4^(n+1)-2^n-1 \\ Charles R Greathouse IV, Nov 01 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Brad Clardy, Mar 25 2011
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Feb 25 2018
STATUS
approved