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.

Previous Showing 11-20 of 22 results. Next

A073512 Number of primes less than 10^n with initial digit 6.

Original entry on oeis.org

0, 2, 18, 135, 1013, 8458, 72257, 628206, 5556434, 49815418, 451476802, 4128049326, 38024311091, 352446754137, 3284400373590, 30749731897370, 289066731934716, 2727216210298152, 25812680778645432, 245015325044029789, 2331718909954888809, 22242097596092999144
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=2 because there are 2 primes up to 10^2 whose initial digit is 2 (namely 61 and 67).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[7*10^n] - PrimePi[6*10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 12}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015

A073513 Number of primes less than 10^n with initial digit 5.

Original entry on oeis.org

1, 3, 17, 131, 1055, 8615, 72951, 633932, 5602768, 50193913, 454577490, 4153943134, 38243708524, 354330372215, 3300752009165, 30892997367352, 290332329192655, 2738477783884855, 25913537508233527, 245923809778144431, 2339944887042508496, 22316931815316988517
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=3 because there are 3 primes up to 10^2 whose initial digit is 5 (namely 5, 53 and 59).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[6*10^n] - PrimePi[5*10^n] + f[n - 1]; f[0] = 1; Table[ f[n], {n, 0, 13}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015

A073514 Number of primes less than 10^n with initial digit 4.

Original entry on oeis.org

0, 3, 20, 139, 1069, 8747, 74114, 641594, 5661135, 50653546, 458352691, 4185483176, 38510936699, 356622729564, 3320632228693, 31067060521057, 291869049531878, 2752144407792176, 26035873192178041, 247025281876786013, 2349914303292170310, 22407593754131275705
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=3 because there are 3 primes up to 10^2 whose initial digit is 4 (namely 41, 43 and 47).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[5*10^n] - PrimePi[4*10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 13}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015

A073515 Number of primes less than 10^n with initial digit 3.

Original entry on oeis.org

1, 3, 19, 139, 1097, 8960, 75290, 651085, 5735086, 51247361, 463196868, 4225763390, 38851672813, 359541975662, 3345924530873, 31288310624754, 293820812588401, 2769490109678920, 26191046215879444, 248421640738371325, 2362546444095790527, 22522418647770393663
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=3 because there are 3 primes up to 10^2 whose initial digit is 3 (namely 3, 31 and 37).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[4*10^n] - PrimePi[3*10^n] + f[n - 1]; f[0] = 1; Table[ f[n], {n, 0, 12}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(21)-a(22) added by David Baugh, Mar 22 2015

A073516 Number of primes less than 10^n with initial digit 2.

Original entry on oeis.org

1, 3, 19, 146, 1129, 9142, 77025, 664277, 5837665, 52064915, 469864125, 4281198201, 39319600765, 363545360347, 3380562309312, 31590949437540, 296487794277035, 2793170342851930, 26402713858800478, 250324979315879678, 2379753569255122805, 22678735843184786383
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=3 because there are 3 primes up to 10^2 whose initial digit is 2 (namely 2, 23 and 29).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[3*10^n] - PrimePi[2*10^n] + f[n - 1]; f[0] = 1; Table[ f[n], {n, 0, 13}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(21)-a(22) added by David Baugh, Mar 21 2015

A045713 Primes with first digit 7.

Original entry on oeis.org

7, 71, 73, 79, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000040.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509.
Column k=7 of A262369.

Programs

  • Magma
    [p: p in PrimesUpTo(7300) | Intseq(p)[#Intseq(p)] eq 7]; // Vincenzo Librandi, Aug 08 2014
    
  • Mathematica
    Select[ Table[ Prime[ n ], {n, 1000} ], First[ IntegerDigits[ # ]]==7& ]
  • Python
    from itertools import chain, count, islice
    from sympy import primerange
    def A045713_gen(): # generator of terms
        return chain.from_iterable(primerange(7*(m:=10**l),m<<3) for l in count(0))
    A045713_list = list(islice(A045713_gen(),40)) # Chai Wah Wu, Dec 08 2024
    
  • Python
    from sympy import primepi
    def A045713(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x+primepi(min(7*(m:=10**(l:=len(str(x))-1))-1,x))-primepi(min((m<<3)-1,x))+sum(primepi(7*(m:=10**i)-1)-primepi((m<<3)-1) for i in range(l))
        return bisection(f,n,n) # Chai Wah Wu, Dec 08 2024

Extensions

More terms from Erich Friedman.
Corrected by Jud McCranie, Jan 03 2001
a(13)=757 added from Vincenzo Librandi, Aug 08 2014

A045715 Primes with first digit 9.

Original entry on oeis.org

97, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257
Offset: 1

Views

Author

Keywords

Crossrefs

For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509.
Column k=9 of A262369.

Programs

  • Magma
    [p: p in PrimesUpTo(10^4) | Intseq(p)[#Intseq(p)] eq 9]; // Bruno Berselli, Jul 19 2014
    
  • Magma
    [p: p in PrimesInInterval(9*10^n,10^(n+1)), n in [0..3]]; // Bruno Berselli, Aug 08 2014
    
  • Mathematica
    Flatten[Table[Prime[Range[PrimePi[9 * 10^n] + 1, PrimePi[10^(n + 1)]]], {n, 3}]] (* Alonso del Arte, Jul 19 2014 *)
  • Python
    from itertools import chain, count, islice
    def A045715_gen(): # generator of terms
        return chain.from_iterable(primerange(9*(m:=10**l),10*m) for l in count(0))
    A045715_list = list(islice(A045715_gen(),40)) # Chai Wah Wu, Dec 08 2024
    
  • Python
    from sympy import primepi
    def A045715(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x+primepi(min(9*(m:=10**(l:=len(str(x))-1))-1,x))-primepi(min(10*m-1,x))+sum(primepi(9*(m:=10**i)-1)-primepi(10*m-1) for i in range(l))
        return bisection(f,n,n) # Chai Wah Wu, Dec 08 2024

Extensions

More terms from Erich Friedman.

A262369 A(n,k) is the n-th prime whose decimal expansion begins with the decimal expansion of k; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

11, 2, 13, 3, 23, 17, 41, 31, 29, 19, 5, 43, 37, 211, 101, 61, 53, 47, 307, 223, 103, 7, 67, 59, 401, 311, 227, 107, 83, 71, 601, 503, 409, 313, 229, 109, 97, 89, 73, 607, 509, 419, 317, 233, 113, 101, 907, 809, 79, 613, 521, 421, 331, 239, 127
Offset: 1

Views

Author

Alois P. Heinz, Sep 20 2015

Keywords

Examples

			Square array A(n,k) begins:
:  11,   2,   3,  41,   5,  61,   7,  83, ...
:  13,  23,  31,  43,  53,  67,  71,  89, ...
:  17,  29,  37,  47,  59, 601,  73, 809, ...
:  19, 211, 307, 401, 503, 607,  79, 811, ...
: 101, 223, 311, 409, 509, 613, 701, 821, ...
: 103, 227, 313, 419, 521, 617, 709, 823, ...
: 107, 229, 317, 421, 523, 619, 719, 827, ...
: 109, 233, 331, 431, 541, 631, 727, 829, ...
		

Crossrefs

Row n=1 gives A018800.
Main diagonal gives A077345.

Programs

  • Maple
    u:= (h, t)-> select(isprime, [seq(h*10^t+k, k=0..10^t-1)]):
    A:= proc(n, k) local l, p;
          l:= proc() [] end; p:= proc() -1 end;
          while nops(l(k))
    				
  • Mathematica
    u[h_, t_] := Select[Table[h*10^t + k, {k, 0, 10^t - 1}], PrimeQ];
    A[n_, k_] := Module[{l, p}, l[] = {}; p[] = -1; While[Length[l[k]] < n, p[k] = p[k]+1; l[k] = Join[l[k], u[k, p[k]]]]; l[k][[n]]];
    Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 12}] // Flatten (* Jean-François Alcover, Dec 06 2019, from Maple *)

A217399 Numbers starting with 6.

Original entry on oeis.org

6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/54 and 10/63, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • GAP
    Flat(List([0..2],n->List([0..10^n-1],k->6*10^n+k))); # Muniru A Asiru, Nov 21 2018
    
  • Magma
    [n: n in [1..1600] | Intseq(n)[#Intseq(n)] eq 6]; // Vincenzo Librandi, Nov 24 2018
    
  • Maple
    seq(seq(6*10^n+k, k=0..10^n-1),n=0..3); # Robert Israel, May 08 2017
  • Mathematica
    Select[Range[1000], IntegerDigits[#][[1]] == 6 &] (* T. D. Noe, Oct 02 2012 *)
  • PARI
    isok(n) = digits(n)[1] == 6; \\ Michel Marcus, May 08 2017
    
  • Python
    def A217399(n): return n+(53*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

a(n) = n + (53*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 17 2023

A065680 Number of primes <= prime(n) which begin with a 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 13 2001

Keywords

Comments

Considering the frequency of all decimal digits in leading position of prime numbers (A065681 - A065687), we cannot apply Benford's Law. But we observe at 10^e - levels that the frequency for 0 to 9 decreases monotonically, at least in the small range until 10^7.
The "begins with 9" sequence is too dull to include. - N. J. A. Sloane
Note that the primes do not satisfy Benford's law (see A000040). - N. J. A. Sloane, Feb 08 2017

Examples

			13 is the second prime beginning with 1: A000040(6) = 13, therefore a(6) = 2. a(664579) = 80020 (A000040(664579) = 9999991 is the largest prime < 10^7).
		

Crossrefs

Programs

  • Mathematica
    Accumulate[If[First[IntegerDigits[#]]==1,1,0]&/@Prime[Range[80]]] (* Harvey P. Dale, Jan 22 2013 *)
  • PARI
    lista(n) = { my(a=[p\10^logint(p,10)==1 | p<-primes(n)]); for(i=2, #a, a[i]+=a[i-1]); a} \\ Harry J. Smith, Oct 26 2009
Previous Showing 11-20 of 22 results. Next