login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138120 Concatenation of n digits 1, 2n-1 digits 0 and n digits 1. 15

%I #25 Feb 16 2024 10:06:21

%S 101,1100011,11100000111,111100000001111,1111100000000011111,

%T 11111100000000000111111,111111100000000000001111111,

%U 1111111100000000000000011111111,11111111100000000000000000111111111,111111111100000000000000000001111111111

%N Concatenation of n digits 1, 2n-1 digits 0 and n digits 1.

%C a(n) has 4n-1 digits.

%C a(n) is also A147539(n) written in base 2. [_Omar E. Pol_, Nov 08 2008]

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (11011,-10121010,110110000,-100000000).

%F 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]

%e n ........... a(n)

%e 1 ........... 101

%e 2 ......... 1100011

%e 3 ....... 11100000111

%e 4 ..... 111100000001111

%e 5 ... 1111100000000011111

%p a:= n-> parse(cat(1$n,0$(2*n-1),1$n)):

%p seq(a(n), n=1..11); # _Alois P. Heinz_, Mar 03 2022

%t 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 *)

%o (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

%o (Python)

%o def a(n): return int("1"*n + "0"*(2*n-1) + "1"*n)

%o print([a(n) for n in range(1, 11)]) # _Michael S. Branicky_, Mar 03 2022

%Y Cf. A138144, A138145, A138146, A138148, A138720, A138721, A138722, A138826.

%Y Cf. A147539. [_Omar E. Pol_, Nov 08 2008]

%K base,easy,nonn

%O 1,1

%A _Omar E. Pol_, Apr 06 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)