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-4 of 4 results.

A087630 Number of n-digit primes ending in 1 in base 10.

Original entry on oeis.org

0, 5, 35, 266, 2081, 17230, 146487, 1274194, 11271088, 101050133, 915755611, 8372443850, 77114409020
Offset: 1

Views

Author

Meenakshi Srikanth (menakan_s(AT)yahoo.com) and Amarnath Murthy, Sep 15 2003

Keywords

Examples

			a(2) = 5 as there exist 5 two-digit prime numbers (11, 31, 41, 61, and 71) with units place 1.
a(3) = 35, since there are 35 three-digit numbers with units place digit as 1.
		

Crossrefs

Programs

  • Java
    /** The terms of the sequences are generated by changing the range for j for the various numbers of digits. E.g., it ranges from 100 to 999 for three-digit numbers. */
    float r, x;
    int c = 0, count = 0;
    for (float j = 100f; j < 1000f; j++) { for (float i = 2f; i < j; i++) { r = j % i; if (r == 0) c = 1; } if (c == 0) { x = j % 10; if (x == 1) count = count + 1; } c = 0; } System.out.println("count = " + count);
    
  • Mathematica
    Table[Length[Select[Range[10^n + 1, 10^(n + 1) - 9, 10], PrimeQ[#] &]], {n, 5}] (* Alonso del Arte, Apr 27 2014 *)
  • PARI
    a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==1, c++)); c \\ Iain Fox, Aug 07 2018

Formula

From Iain Fox, Aug 07 2018: (Start)
a(n) ~ (1/4) * Integral_{x=10^(n-1)..10^n} (dx/log(x)).
a(n) = A006879(n) - A087631(n) - A087632(n) - A087633(n), for n > 1.
(End)

Extensions

More terms from Ray Chandler, Oct 04 2003
Offset corrected by Iain Fox, Aug 07 2018
a(11) from Iain Fox, Aug 07 2018
a(12)-a(13) from Giovanni Resta, Aug 07 2018

A073506 Number of primes == 3 (mod 10) less than 10^n.

Original entry on oeis.org

1, 7, 42, 310, 2402, 19665, 166230, 1440474, 12712499, 113765625, 1029509448, 9401979904, 86516427946
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Comments

Also Pi(n,5,3)
This and the related sequences A073505-A073517 and A006880, A073548-A073565 are included because there is interest in the distribution of primes by their initial or final digits.

Examples

			a(2)=7 because there are 7 primes == 3 (mod 10) less than 10^2. They are 3, 13, 23, 43, 53, 73 and 83.
		

Crossrefs

Programs

  • Mathematica
    c = 0; k = 3; Do[While[k < 10^n, If[PrimeQ[k], c++ ]; k += 10]; Print[c], {n, 1, 10}]

Formula

A073505(n) + a(n) + A073507(n) + A073508(n) + 2 = A006880(n).

Extensions

Edited by Robert G. Wilson v, Oct 03 2002
a(10) from Robert G. Wilson v, Dec 22 2003
a(11)-a(13) from Giovanni Resta, Aug 07 2018

A073507 Number of primes == 7 (mod 10) less than 10^n.

Original entry on oeis.org

1, 6, 46, 308, 2411, 19621, 166211, 1440495, 12712314, 113764039, 1029518337, 9401997000, 86516367790
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Comments

This and the related sequences A073505-A073517 and A006880, A073548-A073565 are included because there is interest in the distribution of primes by their initial or final digits.

Examples

			a(2)=6 because there are 6 primes == 7 (mod 10) less than 10^2. They are 7, 17, 37, 47, 67 and 97.
		

Crossrefs

Programs

  • Mathematica
    c = 0; k = 7; Do[While[k < 10^n, If[PrimeQ[k], c++ ]; k += 10]; Print[c], {n, 1, 10}]

Formula

A073505(n) + A073506(n) + a(n) + A073508(n) + 2 = A006880(n).

Extensions

Edited by Robert G. Wilson v, Oct 03 2002
a(10) from Robert G. Wilson v, Dec 22 2003
a(11)-a(13) from Giovanni Resta, Aug 07 2018

A073508 Number of primes == 9 (mod 10) less than 10^n.

Original entry on oeis.org

0, 5, 38, 303, 2390, 19593, 166032, 1440186, 12711333, 113761326, 1029509896, 9401974132, 86516371101
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Comments

This and the related sequences A073505-A073517 and A006880, A073548-A073565 are included because there is interest in the distribution of primes by their initial or final digits.

Examples

			a(2) = 5 because there are 5 primes == 9 (mod 10) less than 10^2. They are 19, 29, 59, 79 and 89.
		

Crossrefs

Programs

  • Mathematica
    c = 0; k = 9; Do[While[k < 10^n, If[PrimeQ[k], c++ ]; k += 10]; Print[c], {n, 1, 10}]

Formula

A073505(n) + A073506(n) + A073507(n) + a(n) + 2 = A006880(n).

Extensions

Edited by Robert G. Wilson v, Oct 03 2002
a(10) from Robert G. Wilson v, Dec 22 2003
a(11)-a(13) from Giovanni Resta, Aug 07 2018
Showing 1-4 of 4 results.