The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A319678 Numbers with property that the first digit is the length of the number (written in base 10). 4
1, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The last term of this sequence is a(111111111) = 999999999.
Numbers n such that A000030(n) = A055642(n). - Felix Fröhlich, Sep 27 2018
LINKS
EXAMPLE
300 belongs to the sequence since its initial digit is 3 and the number has three digits. 3001 does not belong to the sequence since its initial digit is 3, but the number has four digits in total.
MATHEMATICA
Select[Range[1000], IntegerDigits[#][[1]] == Length[IntegerDigits[#]] &] (* Alonso del Arte, Dec 24 2018 *)
PROG
(GAP) P:=List([1..340], ListOfDigits);;
a:=Filtered([1..Length(P)], i->P[i][1]=Size(P[i])); # Muniru A Asiru, Sep 26 2018
(PARI) is(n) = #digits(n)==digits(n)[1] \\ Felix Fröhlich, Sep 27 2018
(PARI) a(n, base=10) = for (w=1, oo, my (c=base^(w-#digits(w, base))); if (n<=c, return (c*w+n-1), n-=c)) \\ Rémy Sigrist, Dec 25 2018
(Python)
def ok(n): strn = str(n); return int(strn[0]) == len(strn)
def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
print(aupto(350)) # Michael S. Branicky, Jan 20 2021
CROSSREFS
Sequence in context: A004461 A008553 A007930 * A270045 A133895 A138602
KEYWORD
base,easy,nonn,fini
AUTHOR
Halfdan Skjerning, Sep 26 2018
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 May 23 18:59 EDT 2024. Contains 372765 sequences. (Running on oeis4.)