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.

A088754 Number of n-digit primes beginning with prime(n).

This page as a plain text file.
%I A088754 #29 Apr 26 2020 09:06:40
%S A088754 1,2,14,107,103,851,6931,59557,518971,4585526,41368791,375232730,
%T A088754 3441863700,31843327587,295907384843,2761221438054,25890141962275,
%U A088754 244138314690159,2306482418751769,21874074143081175,208132164249925671,1983046852246630734,18946883921641542673
%N A088754 Number of n-digit primes beginning with prime(n).
%C A088754 Subsidiary sequence suggested in A088104.
%H A088754 Tomás Oliveira e Silva, <a href="http://sweet.ua.pt/tos/primes.html">Tables of values of pi(x) and of pi2(x)</a>
%e A088754 a(2) = 2 since 31 and 37 are the only two 2-digit primes beginning with prime(2) = 3.
%o A088754 (PARI) A088754(n)={ local (resul,sdig,p,lo,hi) ; sdig=prime(n) ; lo=sdig ; hi=sdig+1 ; while( lo < 10^(n-1), lo *= 10 ; hi *= 10 ; ) ; resul=0 ; p=nextprime(lo) ; while(p < hi, resul++ ; p=nextprime(p+1) ; ) ; return(resul) ; }
%o A088754 { for(n=1,11, print(A088754(n)); ) } \\ _R. J. Mathar_, Sep 25 2006
%o A088754 (Python)
%o A088754 from sympy import prime, primepi
%o A088754 def A088754(n):
%o A088754     p = prime(n)
%o A088754     m = n-len(str(p))
%o A088754     return primepi((p+1)*10**m)-primepi(p*10**m) # _Chai Wah Wu_, Jun 18 2019
%Y A088754 Cf. A077504, A077505, A088104, A088105, A088755.
%K A088754 nonn,base
%O A088754 1,2
%A A088754 _Ray Chandler_, Oct 15 2003
%E A088754 a(10) from _R. J. Mathar_, Sep 25 2006
%E A088754 a(11)-a(14) from Floris P. van Doorn and Jasper Mulder (florisvandoorn(AT)hotmail.com), Oct 12 2009
%E A088754 a(15)-a(22) from _Donovan Johnson_, Apr 24 2013
%E A088754 a(23) from _Chai Wah Wu_, Jun 19 2019