A184337 a(n) is the integer whose decimal representation consists of n 8's followed by n 1's.
0, 81, 8811, 888111, 88881111, 8888811111, 888888111111, 88888881111111, 8888888811111111, 888888888111111111, 88888888881111111111, 8888888888811111111111, 888888888888111111111111, 88888888888881111111111111
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Richard Blecksmith and Charles Nicol, Monotonic Numbers, Mathematics Magazine, 66, (1993), 257-262.
- Index entries for linear recurrences with constant coefficients, signature (111,-1110,1000).
Crossrefs
Programs
-
Magma
[(8*100^n-7*10^n-1)/9: n in [0..20]]; // Vincenzo Librandi, Aug 04 2011
-
Mathematica
Table[(8*100^n - 7*10^n - 1)/9, {n,0,30}] (* G. C. Greubel, Nov 02 2018 *) 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 *)
-
PARI
vector(30, n, n--; (8*100^n - 7*10^n - 1)/9) \\ G. C. Greubel, Nov 02 2018
-
Python
for n in range(30): print((8*100**n-7*10**n-1)//9, end=', ') # Stefano Spezia, Nov 02 2018
Formula
a(n) = (8*100^n - 7*10^n - 1)/9.
G.f.: 9*x*(-9+20*x) / ( (x-1)*(100*x-1)*(10*x-1) ). - R. J. Mathar, Feb 28 2011