login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109002 Maximal difference between two n-digit numbers. 6
9, 89, 899, 8999, 89999, 899999, 8999999, 89999999, 899999999, 8999999999, 89999999999, 899999999999, 8999999999999, 89999999999999, 899999999999999 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(n) = A061601(A178500(n-1)). [From Reinhard Zumkeller, May 28 2010]

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..200

Index entries for linear recurrences with constant coefficients, signature (11,-10).

FORMULA

a(n) = (10^n -1) - 10^(n-1), n >1.

a(n+1) = 10*a(n) + 9. [From Reinhard Zumkeller, May 28 2010]

G.f.: 9*x -x^2*(-89+80*x) / ( (10*x-1)*(x-1) ). - R. J. Mathar, Oct 29 2011

EXAMPLE

a(1) =9-0 =9, a(4) = 9999-1000 = 8999.

PROG

(MAGMA) [9], [9*10^n-1: n in [1..30]]; // Vincenzo Librandi, Oct 29 2011

(PARI) a(n)=if(n>1, (10^n-1)-10^(n-1), 9) \\ Charles R Greathouse IV, Oct 29 2011

CROSSREFS

Sequence in context: A072256 A138288 A059482 * A142991 A152267 A082147

Adjacent sequences:  A108999 A109000 A109001 * A109003 A109004 A109005

KEYWORD

base,easy,nonn

AUTHOR

Amarnath Murthy, Aug 14 2005

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 16 00:25 EDT 2018. Contains 313782 sequences. (Running on oeis4.)