A073505
Number of primes == 1 (mod 10) less than 10^n.
Original entry on oeis.org
0, 5, 40, 306, 2387, 19617, 166104, 1440298, 12711386, 113761519, 1029517130, 9401960980, 86516370000
Offset: 1
a(2) = 5 because there are 5 primes == 1 (mod 10) less than 10^2. They are 11, 31, 41, 61 and 71.
Cf.
A006880,
A087630,
A073506,
A073507,
A073508,
A073509,
A073510,
A073511,
A073512,
A073513,
A073514,
A073515,
A073516,
A073517.
-
c = 0; k = 1; Do[While[k < 10^n, If[PrimeQ[k], c++ ]; k += 10]; Print[c], {n, 1, 10}]
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
a(2)=6 because there are 6 primes == 7 (mod 10) less than 10^2. They are 7, 17, 37, 47, 67 and 97.
Cf.
A006880,
A087632,
A073505,
A073506,
A073508,
A073509,
A073510,
A073511,
A073512,
A073513,
A073514,
A073515,
A073516,
A073517.
-
c = 0; k = 7; Do[While[k < 10^n, If[PrimeQ[k], c++ ]; k += 10]; Print[c], {n, 1, 10}]
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
Showing 1-4 of 4 results.
Comments