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
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
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.
Cf.
A006880,
A087631,
A073505,
A073507,
A073508,
A073509,
A073510,
A073511,
A073512,
A073513,
A073514,
A073515,
A073516,
A073517.
-
c = 0; k = 3; 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}]
Showing 1-4 of 4 results.
Comments