OFFSET
0,1
COMMENTS
Binary numbers of form 111111(n)1 where n is the index and number of 0's.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
From Elmo R. Oliveira, Dec 01 2025: (Start)
G.f.: (127-128*x)/((2*x-1)*(x-1)).
E.g.f.: exp(x)*(1 + 126*exp(x)).
a(n) = 3*a(n-1) - 2*a(n-2). (End)
EXAMPLE
First few terms in binary are 1111111, 11111101, 111111001, 1111110001, 11111100001.
MATHEMATICA
LinearRecurrence[{3, -2}, {127, 253}, 50] (* Vincenzo Librandi, Nov 25 2011 *)
PROG
(Magma) [63*2^(n+1) + 1: n in [0..100]];
(PARI) a(n)=126<<n+1 \\ Charles R Greathouse IV, Oct 06 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Brad Clardy, Oct 04 2011
STATUS
approved
