OFFSET
1,2
COMMENTS
a(n) is also A147596(n) written in base 2. - Omar E. Pol, Nov 08 2008
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..995
Index entries for linear recurrences with constant coefficients, signature (11,-10).
FORMULA
From Colin Barker, Sep 15 2013: (Start)
a(n) = 111+111*10^(n-3) for n>5.
a(n) = 11*a(n-1)-10*a(n-2).
G.f.: -x*(10*x^2-1)*(100*x^4+10*x^2+1) / ((x-1)*(10*x-1)). (End)
EXAMPLE
n .... a(n)
1 .... 1
2 .... 11
3 .... 111
4 .... 1111
5 .... 11111
6 .... 111111
7 .... 1110111
8 .... 11100111
9 .... 111000111
10 ... 1110000111
11 ... 11100000111
12 ... 111000000111
13 ... 1110000000111
MATHEMATICA
Table[If[n < 7, (10^n - 1)/9, 111 + 111*10^(n-3)], {n, 25}] (* or *)
LinearRecurrence[{11, -10}, {1, 11, 111, 1111, 11111, 111111, 1110111}, 25] (* Paolo Xausa, Aug 08 2024 *)
PROG
(PARI) Vec(-x*(10*x^2-1)*(100*x^4+10*x^2+1)/((x-1)*(10*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Omar E. Pol, Mar 29 2008
EXTENSIONS
Better definition from Omar E. Pol, Nov 16 2008
STATUS
approved