OFFSET
1,1
COMMENTS
a(n) has 4n-1 digits.
a(n) is also A147539(n) written in base 2. [Omar E. Pol, Nov 08 2008]
LINKS
Index entries for linear recurrences with constant coefficients, signature (11011,-10121010,110110000,-100000000).
FORMULA
G.f.: x*(10001000*x^2-12100*x+101) / ((x-1)*(10*x-1)*(1000*x-1)*(10000*x-1)). [Colin Barker, Sep 16 2013]
EXAMPLE
n ........... a(n)
1 ........... 101
2 ......... 1100011
3 ....... 11100000111
4 ..... 111100000001111
5 ... 1111100000000011111
MAPLE
a:= n-> parse(cat(1$n, 0$(2*n-1), 1$n)):
seq(a(n), n=1..11); # Alois P. Heinz, Mar 03 2022
MATHEMATICA
Table[FromDigits[Join[PadRight[{}, n, 1], PadRight[{}, 2n-1, 0], PadRight[ {}, n, 1]]], {n, 10}] (* or *) LinearRecurrence[{11011, -10121010, 110110000, -100000000}, {101, 1100011, 11100000111, 111100000001111}, 10] (* Harvey P. Dale, Mar 19 2016 *)
PROG
(PARI) Vec(x*(10001000*x^2-12100*x+101)/((x-1)*(10*x-1)*(1000*x-1)*(10000*x-1)) + O(x^100)) \\ Colin Barker, Sep 16 2013
(Python)
def a(n): return int("1"*n + "0"*(2*n-1) + "1"*n)
print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Mar 03 2022
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Omar E. Pol, Apr 06 2008
STATUS
approved