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.

Showing 1-5 of 5 results.

A077504 Smallest n-digit prime beginning with n.

Original entry on oeis.org

23, 307, 4001, 50021, 600011, 7000003, 80000023, 900000011, 1000000007, 11000000021, 120000000007, 1300000000021, 14000000000003, 150000000000007, 1600000000000007, 17000000000000009, 180000000000000029
Offset: 2

Views

Author

Amarnath Murthy, Nov 08 2002

Keywords

Crossrefs

Extensions

More terms from Sascha Kurz, Jan 04 2003

A088104 Smallest n-digit prime beginning with prime(n), or 0 if no such prime exists.

Original entry on oeis.org

2, 31, 503, 7001, 11003, 130003, 1700021, 19000013, 230000003, 2900000017, 31000000027, 370000000003, 4100000000003, 43000000000063, 470000000000023, 5300000000000129, 59000000000000011, 610000000000000031, 6700000000000000021, 71000000000000000047, 730000000000000000001
Offset: 1

Views

Author

Amarnath Murthy, Sep 24 2003

Keywords

Comments

Conjecture: No term is zero. Subsidiary sequences: (1) A088754 = number of n-digit primes beginning with prime(n). (2) A088755 = number of n-digit primes beginning with n.
If Legendre's conjecture is true, then no term is zero. - Chai Wah Wu, Jun 18 2019

Examples

			a(6) = 130003 begins with prime(6) = 13 and has 6 digits.
		

Crossrefs

Programs

  • Mathematica
    Prepend[NextPrime[FromDigits[PadRight[IntegerDigits[#],PrimePi[#]]]]&/@Prime[Range[2,25]],2]  (* Harvey P. Dale, Jan 09 2011 *)
  • PARI
    a(n) = my(p=prime(n), d=digits(p)); c=nextprime(p*10^(n-#d)); cd=digits(c); if(vector(#d, i, cd[i]) == d, return(c), return(0)) \\ David A. Corneth, Apr 13 2019
    
  • Python
    from sympy import prime, nextprime
    def A088104(n):
        p = prime(n)
        return nextprime(p*10**(n-len(str(p)))-1) # Chai Wah Wu, Jun 18 2019

Extensions

More terms from Ray Chandler, Oct 15 2003
More terms from David A. Corneth, Apr 13 2019

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

Original entry on oeis.org

1, 2, 14, 107, 103, 851, 6931, 59557, 518971, 4585526, 41368791, 375232730, 3441863700, 31843327587, 295907384843, 2761221438054, 25890141962275, 244138314690159, 2306482418751769, 21874074143081175, 208132164249925671, 1983046852246630734, 18946883921641542673
Offset: 1

Views

Author

Ray Chandler, Oct 15 2003

Keywords

Comments

Subsidiary sequence suggested in A088104.

Examples

			a(2) = 2 since 31 and 37 are the only two 2-digit primes beginning with prime(2) = 3.
		

Crossrefs

Programs

  • 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) ; }
    { for(n=1,11, print(A088754(n)); ) } \\ R. J. Mathar, Sep 25 2006
    
  • Python
    from sympy import prime, primepi
    def A088754(n):
        p = prime(n)
        m = n-len(str(p))
        return primepi((p+1)*10**m)-primepi(p*10**m) # Chai Wah Wu, Jun 18 2019

Extensions

a(10) from R. J. Mathar, Sep 25 2006
a(11)-a(14) from Floris P. van Doorn and Jasper Mulder (florisvandoorn(AT)hotmail.com), Oct 12 2009
a(15)-a(22) from Donovan Johnson, Apr 24 2013
a(23) from Chai Wah Wu, Jun 19 2019

A088105 a(n) = smallest n-digit prime beginning with prime(n)- smallest n-digit number beginning with prime(n).

Original entry on oeis.org

0, 1, 3, 1, 3, 3, 21, 13, 3, 17, 27, 3, 3, 63, 23, 129, 11, 31, 21, 47, 1, 13, 47, 53, 307, 11, 19, 17, 151, 11, 39, 23, 93, 33, 23, 7, 1, 147, 219, 39, 71, 201, 93, 7, 39, 153, 21, 9, 89, 247, 69, 27, 79, 137, 159, 41, 21, 253, 19, 249, 151, 101, 91, 501, 339, 269, 147, 63, 9
Offset: 1

Views

Author

Amarnath Murthy, Sep 24 2003

Keywords

Examples

			a(6) =3 = 130003 - 130000.
		

Crossrefs

Extensions

Corrected and extended by Ray Chandler, Oct 15 2003

A088755 Number of n-digit primes beginning with n.

Original entry on oeis.org

0, 2, 16, 119, 924, 7445, 63129, 547572, 4838319, 4814936, 43167234, 391378851, 3580266494, 32997926272, 306051434210, 2853931339135, 26737370196938, 251515351394258, 2374493400086829, 22488661383368556, 213597279448646179, 2033961812788210675, 19413250431142245897
Offset: 1

Views

Author

Ray Chandler, Oct 15 2003

Keywords

Comments

This is a subsidiary sequence suggested in A088104.

Examples

			a(2) = 2 since 23 and 29 are the only two 2-digit primes beginning with 2.
		

Crossrefs

Extensions

More terms from Harvey P. Dale, Oct 16 2003
a(10)-a(13) corrected and a(14)-a(22) from Donovan Johnson, Apr 24 2013
Incorrect Mathematica program deleted by Harvey P. Dale, Apr 25 2013
a(23) from Chai Wah Wu, Jun 20 2019
Showing 1-5 of 5 results.