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!)
A098955 Numbers with property that the last digit is the length of the number (written in base 10). 3
1, 12, 22, 32, 42, 52, 62, 72, 82, 92, 103, 113, 123, 133, 143, 153, 163, 173, 183, 193, 203, 213, 223, 233, 243, 253, 263, 273, 283, 293, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 403, 413, 423, 433, 443, 453, 463, 473, 483, 493, 503 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Otherwise said: list of n-digit numbers with n+1 appended, for n=0,1,2,... The sequence is obviously finite, since the largest possible digit and thus maximal possible length of a term is 9. The formula confirms that the last and largest term is a(10^8)=999999999. - M. F. Hasler, Jan 06 2013
LINKS
FORMULA
a(n) = 10(n-1)+2 = 10n-8 for n=2,...,10,
a(n) = 10(n-1)+3 = 10n-7 for n=11,...,100,
a(n) = 10(n-1)+4 = 10n-6 for n=101,...,1000, and so on,
a(n) = 10(n-1)+k+1 = 10n-(9-k) for 10^(k-1) < n <= 10^k, up to
a(n) = 10(n-1)+9 = 10n-1 for n=10^7+1,...,10^8. - M. F. Hasler, Jan 06 2013
MAPLE
1, seq(seq(10*(n-1)+d, n=10^(d-2)+1..10^(d-1)), d=2..4); # Robert Israel, Aug 17 2018
PROG
(PARI) A098955(n)=n*10-9+#Str(n-1)-(n==1) \\ M. F. Hasler, Jan 06 2013
(Python)
def a(n): s = str(n); return int(s + str(len(s) + int(n != 0)))
print([a(n) for n in range(51)]) # Michael S. Branicky, Aug 04 2022
CROSSREFS
Sequence in context: A278030 A286094 A348187 * A285470 A124885 A115745
KEYWORD
base,easy,nonn,fini
AUTHOR
Eric Angelini, Oct 21 2004
STATUS
approved

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 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)