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
Meenakshi Srikanth (menakan_s(AT)yahoo.com) and Amarnath Murthy, Sep 15 2003
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.
-
/** 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);
-
Table[Length[Select[Range[10^n + 1, 10^(n + 1) - 9, 10], PrimeQ[#] &]], {n, 5}] (* Alonso del Arte, Apr 27 2014 *)
-
a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==1, c++)); c \\ Iain Fox, Aug 07 2018
Offset corrected by
Iain Fox, 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
a(2) = 5 because there are 5 primes == 9 (mod 10) less than 10^2. They are 19, 29, 59, 79 and 89.
Cf.
A006880,
A087633,
A073505,
A073506,
A073507,
A073509,
A073510,
A073511,
A073512,
A073513,
A073514,
A073515,
A073516,
A073517.
-
c = 0; k = 9; Do[While[k < 10^n, If[PrimeQ[k], c++ ]; k += 10]; Print[c], {n, 1, 10}]
A087631
Number of n-digit primes ending in 3 in base 10.
Original entry on oeis.org
1, 6, 35, 268, 2092, 17263, 146565, 1274244, 11272025, 101053126, 915743823, 8372470456, 77114448042
Offset: 1
Meenakshi Srikanth (menakan_s(AT)yahoo.com) and Amarnath Murthy, Sep 15 2003
a(2) = 6, as there exist 6 two-digit prime numbers (13, 23, 43, 53, 73, and 83) with units place 3.
a(3) = 35, since there are 35 three-digit numbers with units place digit as 3.
-
/** 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 == 3) count = count + 1; } c = 0; } System.out.println("count = " + count);
-
Table[Length[Select[Range[10^n + 3, 10^(n + 1) - 7, 10], PrimeQ[#] &]], {n, 5}] (* Alonso del Arte, Apr 27 2014 *)
-
a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==3, c++)); c \\ Iain Fox, Aug 07 2018
Offset corrected by
Iain Fox, Aug 07 2018
A087632
Number of n-digit primes ending in 7 in base 10.
Original entry on oeis.org
1, 5, 40, 262, 2103, 17210, 146590, 1274284, 11271819, 101051725, 915754298, 8372478663, 77114370790
Offset: 1
Meenakshi Srikanth (menakan_s(AT)yahoo.com) and Amarnath Murthy, Sep 15 2003
a(2) = 5 as there exist 5 two-digit prime numbers (17, 37, 47, 67, and 97) with units place 7.
a(3) = 40, since there are 40 three-digit numbers with units place digit as 7.
-
/** 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 == 7) count = count + 1; } c = 0; } System.out.println("count = " + count);
-
Table[Length[Select[Range[10^n + 7, 10^(n + 1) - 3, 10], PrimeQ[#] &]], {n, 5}] (* Alonso del Arte, Apr 27 2014 *)
-
a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==7, c++)); c \\ Iain Fox, Aug 07 2018
Offset corrected by
Iain Fox, Aug 07 2018
Showing 1-4 of 4 results.
Comments