cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A097944 Number of digits in n-th prime.

This page as a plain text file.
%I A097944 #28 Oct 24 2019 17:24:18
%S A097944 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,
%T A097944 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,
%U A097944 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
%N A097944 Number of digits in n-th prime.
%C A097944 For primes p <= n sum(a(n)) -> n/2 and n-> inf.
%H A097944 Reinhard Zumkeller, <a href="/A097944/b097944.txt">Table of n, a(n) for n = 1..10000</a>
%F A097944 a(n) = (log n + log log n)/(log 10) + O(1).
%F A097944 a(n) = A055642(A000040(n)). - _Reinhard Zumkeller_, Apr 08 2012
%F A097944 a(n) = A068670(n) - A068670(n-1). - _M. F. Hasler_, Oct 24 2019
%e A097944 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.
%t A097944 a[n_]:=StringLength[ToString[Prime[n]]]; (* _Vladimir Joseph Stephan Orlovsky_, Dec 03 2008 *)
%t A097944 IntegerLength[Prime[Range[110]]] (* _Harvey P. Dale_, Oct 04 2012 *)
%o A097944 (PARI) a(n)=#Str(prime(n))
%o A097944 (PARI) A097944(n)=logint(prime(n),10)+1 \\ _M. F. Hasler_, Oct 24 2019
%o A097944 (Haskell)
%o A097944 a097944 = a055642 . a000040 -- _Reinhard Zumkeller_, Apr 08 2012
%Y A097944 Cf. A060417, A068670 (partial sums).
%K A097944 nonn,base,easy
%O A097944 1,5
%A A097944 _Cino Hilliard_, Sep 05 2004