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!)
A097944 Number of digits in n-th prime. 9
1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
For primes p <= n sum(a(n)) -> n/2 and n-> inf.
LINKS
FORMULA
a(n) = (log n + log log n)/(log 10) + O(1).
a(n) = A055642(A000040(n)). - Reinhard Zumkeller, Apr 08 2012
a(n) = A068670(n) - A068670(n-1). - M. F. Hasler, Oct 24 2019
EXAMPLE
The first 4 primes are 2,3,5,7. These are 1-digit numbers so the first 4 entries in the table are 1's.
MATHEMATICA
a[n_]:=StringLength[ToString[Prime[n]]]; (* Vladimir Joseph Stephan Orlovsky, Dec 03 2008 *)
IntegerLength[Prime[Range[110]]] (* Harvey P. Dale, Oct 04 2012 *)
PROG
(PARI) a(n)=#Str(prime(n))
(PARI) A097944(n)=logint(prime(n), 10)+1 \\ M. F. Hasler, Oct 24 2019
(Haskell)
a097944 = a055642 . a000040 -- Reinhard Zumkeller, Apr 08 2012
CROSSREFS
Cf. A060417, A068670 (partial sums).
Sequence in context: A204553 A214455 A060417 * A037203 A032556 A110592
KEYWORD
nonn,base,easy
AUTHOR
Cino Hilliard, Sep 05 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 29 09:10 EDT 2024. Contains 372106 sequences. (Running on oeis4.)