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 24 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.

A217394 Numbers starting with 2.

Original entry on oeis.org

2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242
Offset: 1

Views

Author

Jeremy Gardiner, Oct 02 2012

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    Select[Range[300], IntegerDigits[#][[1]] == 2 &] (* T. D. Noe, Oct 02 2012 *)
  • Python
    def agen():
      yield 2
      digits, adder = 1, 20
      while True:
        for i in range(10**digits): yield adder + i
        digits, adder = digits+1, adder*10
    g = agen()
    print([next(g) for i in range(54)]) # Michael S. Branicky, Feb 20 2021
    
  • Python
    def A217394(n): return n+(17*10**(len(str(9*n-8))-1))//9 # Chai Wah Wu, Dec 07 2024

Formula

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

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 *)

A208272 Primes containing a digit 2.

Original entry on oeis.org

2, 23, 29, 127, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 421, 521, 523, 727, 821, 823, 827, 829, 929, 1021, 1123, 1129, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1321, 1327
Offset: 1

Views

Author

Jaroslav Krizek, Mar 04 2012

Keywords

Comments

Supersequence of A045708. Subsequence of A011532.
Complement of A208273 with respect to A011532.
Also primes p whose divisors d_k (k = 1, 2; 1 = d_1 < d_2 = p) contain digit equal to number k.
Complement of A208275 with respect to A208274.
Primes with at least one digit equal to 2. - Harvey P. Dale, Aug 29 2012

Crossrefs

Cf. A208273 (composites containing a digit 2), A011532 (numbers containing a digit 2).

Programs

  • Mathematica
    Select[Range[2000], PrimeQ[#] && MemberQ[IntegerDigits[#], 2] &] (* T. D. Noe, Mar 06 2012 *)
    Select[Prime[Range[300]],DigitCount[#,10,2]>0&] (* Harvey P. Dale, Aug 29 2012 *)

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Nov 01 2022
Previous Showing 11-20 of 24 results. Next