login
Numbers that have only the digit "1" as first, central and final digit. For numbers with 5 or more digits the rest of digits are "0".
15

%I #21 Dec 31 2023 10:20:01

%S 1,111,10101,1001001,100010001,10000100001,1000001000001,

%T 100000010000001,10000000100000001,1000000001000000001,

%U 100000000010000000001,10000000000100000000001

%N Numbers that have only the digit "1" as first, central and final digit. For numbers with 5 or more digits the rest of digits are "0".

%C Also, equal to A135576(n), written in base 2.

%C Essentially the same as A066138. - _R. J. Mathar_ Apr 29 2008

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

%H G. C. Greubel, <a href="/A135577/b135577.txt">Table of n, a(n) for n = 1..500</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (111,-1110,1000).

%F a(n) = A135576(n), written in base 2.

%F Also, a(1)=1, for n>1; a(n)=(concatenation of 1, n-2 digits 0, 1, n-2 digits 0 and 1).

%F From _Colin Barker_, Sep 16 2013: (Start)

%F a(n) = 1 + 10^(n-1) + 100^(n-1) for n>1.

%F a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>4.

%F G.f.: x*(2000*x^3 - 1110*x^2 + 1) / ((1-x)*(10*x-1)*(100*x-1)). (End)

%e ----------------------------

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

%e ----------------------------

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

%e 2 ............ 111

%e 3 ........... 10101

%e 4 .......... 1001001

%e 5 ......... 100010001

%e 6 ........ 10000100001

%e 7 ....... 1000001000001

%e 8 ...... 100000010000001

%e 9 ..... 10000000100000001

%e 10 ... 1000000001000000001

%t Join[{1}, LinearRecurrence[{111, -1110, 1000}, {111, 10101, 1001001}, 25]] (* _G. C. Greubel_, Oct 19 2016 *)

%t Join[{1},Table[FromDigits[Join[{1},PadRight[{},n,0],{1},PadRight[{},n,0],{1}]],{n,0,10}]] (* _Harvey P. Dale_, Aug 15 2022 *)

%o (PARI) Vec(-x*(2000*x^3-1110*x^2+1)/((x-1)*(10*x-1)*(100*x-1)) + O(x^100)) \\ _Colin Barker_, Sep 16 2013

%Y Cf. A001576, A135576, A138118, A138119, A138120, A138147, A138826.

%K nonn,base,less,easy

%O 1,2

%A _Omar E. Pol_, Feb 24 2008