login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the integer whose decimal representation consists of n 8's followed by n 1's.
2

%I #52 Jul 03 2023 13:58:30

%S 0,81,8811,888111,88881111,8888811111,888888111111,88888881111111,

%T 8888888811111111,888888888111111111,88888888881111111111,

%U 8888888888811111111111,888888888888111111111111,88888888888881111111111111

%N a(n) is the integer whose decimal representation consists of n 8's followed by n 1's.

%H Vincenzo Librandi, <a href="/A184337/b184337.txt">Table of n, a(n) for n = 0..200</a>

%H Richard Blecksmith and Charles Nicol, <a href="http://www.jstor.org/stable/2690745">Monotonic Numbers</a>, Mathematics Magazine, 66, (1993), 257-262.

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

%F a(n) = (8*100^n - 7*10^n - 1)/9.

%F a(n) = A059482(n)*A002283(n).

%F G.f.: 9*x*(-9+20*x) / ( (x-1)*(100*x-1)*(10*x-1) ). - _R. J. Mathar_, Feb 28 2011

%t Table[(8*100^n - 7*10^n - 1)/9, {n,0,30}] (* _G. C. Greubel_, Nov 02 2018 *)

%t FromDigits/@Table[Join[PadRight[{},n,8],PadRight[{},n,1]],{n,0,15}] (* or *) LinearRecurrence[ {111,-1110,1000},{0,81,8811},15] (* _Harvey P. Dale_, Jul 03 2023 *)

%o (Magma) [(8*100^n-7*10^n-1)/9: n in [0..20]]; // _Vincenzo Librandi_, Aug 04 2011

%o (PARI) vector(30, n, n--; (8*100^n - 7*10^n - 1)/9) \\ _G. C. Greubel_, Nov 02 2018

%o (Python)

%o for n in range(30):

%o print((8*100**n-7*10**n-1)//9, end=', ')

%o # _Stefano Spezia_, Nov 02 2018

%Y Cf. A098210 (with 1 and 5 instead of 8 and 1).

%Y Cf. A002283, A059482.

%Y Cf. A008591 (digits sums).

%K nonn,easy,base

%O 0,2

%A _Paul Curtz_, Feb 13 2011