OFFSET
1,2
COMMENTS
Bisection of A138145.
a(n) is also A147597(n) written in base 2. [Omar E. Pol, Nov 08 2008]
LINKS
Index entries for linear recurrences with constant coefficients, signature (101,-100).
FORMULA
From Colin Barker, Sep 16 2013: (Start)
a(n) = 111 + 111*100^(n-2) for n>3.
a(n) = 101*a(n-1) - 100*a(n-2) for n>5.
G.f.: -x*(10*x-1)*(10*x+1)*(100*x^2+10*x+1) / ((x-1)*(100*x-1)). (End)
EXAMPLE
n ............ a(n)
1 ............. 1
2 ............ 111
3 ........... 11111
4 .......... 1110111
5 ......... 111000111
6 ........ 11100000111
7 ....... 1110000000111
8 ...... 111000000000111
9 ..... 11100000000000111
10 ... 1110000000000000111
MATHEMATICA
Table[FromDigits@ If[n < 4, ConstantArray[1, 2 n - 1], Join[#, ConstantArray[0, 2 n - 7], #]] &@ ConstantArray[1, 3], {n, 14}] (* or *)
Rest@ CoefficientList[Series[-x (10 x - 1) (10 x + 1) (100 x^2 + 10 x + 1)/((x - 1) (100 x - 1)), {x, 0, 14}], x] (* Michael De Vlieger, Nov 25 2016 *)
PROG
(PARI) Vec(-x*(10*x-1)*(10*x+1)*(100*x^2+10*x+1)/((x-1)*(100*x-1)) + O(x^100)) \\ Colin Barker, Sep 16 2013
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Omar E. Pol, Mar 29 2008, May 18 2008
EXTENSIONS
Better definition from Omar E. Pol, Nov 16 2008
STATUS
approved