cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A138120 Concatenation of n digits 1, 2n-1 digits 0 and n digits 1.

Original entry on oeis.org

101, 1100011, 11100000111, 111100000001111, 1111100000000011111, 11111100000000000111111, 111111100000000000001111111, 1111111100000000000000011111111, 11111111100000000000000000111111111, 111111111100000000000000000001111111111
Offset: 1

Views

Author

Omar E. Pol, Apr 06 2008

Keywords

Comments

a(n) has 4n-1 digits.
a(n) is also A147539(n) written in base 2. [Omar E. Pol, Nov 08 2008]

Examples

			n ........... a(n)
1 ........... 101
2 ......... 1100011
3 ....... 11100000111
4 ..... 111100000001111
5 ... 1111100000000011111
		

Crossrefs

Programs

  • 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 *)
  • 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

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]