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
A087633
Number of n-digit primes ending in 9 in base 10.
Original entry on oeis.org
0, 5, 33, 265, 2087, 17203, 146439, 1274154, 11271147, 101049993, 915748570, 8372464236, 77114396969
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 (19, 29, 59, 79, and 89) with units place 9.
a(3) = 33, since there are 33 three-digit numbers with units place digit as 9.
-
/** 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 == 9) count = count + 1; } c = 0; } System.out.println("count = " + count);
-
Table[Length[Select[Range[10^n + 9, 10^(n + 1) - 1, 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==9, c++)); c \\ Iain Fox, Aug 07 2018
Offset corrected by
Iain Fox, Aug 07 2018
Original entry on oeis.org
5, 21, 142, 1059, 8360, 68940, 586140, 5096885, 45085903, 404203228, 3663001812, 33489858047, 308457620524, 2858876200536, 26639628764285, 249393770865090, 2344318815695001, 22116397127183516, 209317713015989446, 1986761935255798075, 18906449883376272709
Offset: 1
For n=1, A057793(1) - A057793(0) = 5 - 0 = 5.
- John H. Conway and R. K. Guy, "The Book of Numbers," Copernicus, an imprint of Springer-Verlag, NY, 1996, page 144-146.
A309329
Median of primes with n decimal digits.
Original entry on oeis.org
4, 47, 509, 5273, 53047, 532887, 5356259, 53765483, 539119753, 5402600081, 54118210435, 541947386821, 5425907665571, 54313871643797, 543611236251491, 5440228524355329, 54438462600610510, 544705097744731559, 5449909581264135103
Offset: 1
a(1) = 4 because {2, 3, 5, 7} are the 4 one-digit primes. The 2 central elements of the sorted list are 3 and 5. 4 = (3 + 5)/2.
a(2) = 47 because it is the central element of the sorted list of the A006879(2) = 21 two-digit primes. There are 10 such primes < 47 and 10 such primes > 47.
A087434
Number of brilliant numbers whose prime factors each have n digits.
Original entry on oeis.org
10, 231, 10296, 563391, 34974066, 2374052871, 171745762321, 12989075028126, 1016377282340160, 81690831917887753, 6708792934060150753, 560785267822390134615, 47573053155260626453431
Offset: 1
A120120
Number of n-digit prime quadruplets.
Original entry on oeis.org
1, 3, 7, 26, 128, 733, 3869, 23620, 152141, 1028789, 7188960, 51672312, 381226246, 2873279651
Offset: 2
Julien Peter Benney (jpbenney(AT)ftml.net), Aug 15 2006, Aug 19 2006
a(3) = 3 because there are three three-digit prime quadruples: {101, 103, 107, 109}, {191, 193, 197, 199} and {821, 823, 827, 829}.
A178701
An irregular array read by rows. The k-th entry of row r is the number of r-digit primes with digit sum k.
Original entry on oeis.org
1, 0, 1, 1, 0, 1, 2, 2, 2, 3, 3, 3, 1, 1, 2, 1, 1, 2, 4, 7, 7, 12, 13, 16, 16, 13, 18, 12, 11, 6, 4, 1, 0, 0, 4, 8, 20, 19, 31, 52, 67, 77, 93, 101, 116, 95, 92, 91, 63, 51, 29, 30, 16, 5, 0, 1, 0, 4, 12, 28, 45, 95, 143, 236, 272, 411, 479, 630, 664, 742, 757, 741, 706, 580, 528, 379, 341, 205, 166, 84, 62, 34, 13, 4, 2, 0, 2, 14, 58, 76, 204, 389, 660, 852, 1448, 1971, 2832, 3101, 4064, 4651, 5393, 5376, 5570, 5785, 5287, 4796
Offset: 1
To begin the second row, only 11 has digit-sum 2, so the first term is 1; both 13 & 31 have digit-sum 4 so the second term is 2; both 23 & 41 have digit-sum 5, so the third term is 2; etc.
To begin the third row, only 101 -> 2, so its first term is 1, both 103 & 211 -> 4 so its second term is 2; 113, 131, 311 & 401 -> 5, so its third term is 4; etc.
\k 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, ...
r\
1: 1, 0, 1, 1, 0;
2: 1, 2, 2, 2, 3, 3, 3, 1, 1, 2, 1;
3: 1, 2, 4, 7, 7, 12, 13, 16, 16, 13, 18, 12, 11, 6, 4, 1, 0;
4: 0, 4, 8, 20, 19, 31, 52, 67, 77, 93, 101, 116, 95, 92, 91, 63, 51, ...
5: 0, 4, 12, 28, 45, 95, 143, 236, 272, 411, 479, 630, 664, 742, 757, 741, 706, ...
6: 0, 2, 14, 58, 76, 204, 389, 660, 852, 1448, 1971, 2832, 3101, 4064, 4651, 5393, 5376, ...
etc.
Cf.
A000040,
A006880,
A007605,
A177868,
A178183,
A178447,
A178571,
A178605,
A178876,
A178879,
A178884.
Row sums (except for the first term) give
A006879. The indices k are given by
A001651 (beginning with 2).
-
dir[n_] := Floor[(3 n + 2)/2]; inv[n_] := Floor[(2 n - 1)/3]; f[n_] := Block[{p = NextPrime[10^(n - 1)], t = Table[0, {inv[9 n]}]}, While[p < 10^n, t[[ inv[Plus @@ IntegerDigits@ p]]]++; p = NextPrime@ p]; t]; Array[f, 5] // Flatten
A228063
Integer nearest to F[4n](S(n)), where F[4n](x) are Fibonacci polynomials and S(n) = Sum_{i=0..3} (C(i)*(log(log(A*(B+n^2))))^i) (see coefficients A, B, C(i) in comments).
Original entry on oeis.org
4, 21, 143, 1063, 8371, 68785, 583436, 5069633, 44876757, 403025174, 3660702622, 33550877248, 309726969451, 2876065468123, 26835315229835, 251389798269317, 2362887262236150, 22272676889496853, 210455460654786509, 1992806263723883464
Offset: 1
For n =1, F[4](x) = x^3+2x; replace x by Sum_{i=0..3} (C(i)*(log(log(A*(B+1))))^i)= 1.179499… to obtain a(1)= round(F[4]( 1.179499...))=4. For n=2, F[8](x) = x^7+6x^5+10x^3+4x; replace x by Sum_{i=0..3} (C(i)*(log(log(A*(B+4))))^i)= 0.999861... to obtain a(2)= round(F[8]( 0.999861…))=21
- Jonathan Borwein, David H. Bailey, Mathematics by Experiment, A. K. Peters, 2004, p. 65 (Table 2.2).
- John H. Conway and R. K. Guy, The Book of Numbers, Copernicus, an imprint of Springer-Verlag, NY, 1996, page 144.
-
with(combinat):A:=6.74100517717340111e-03: B:=147.60482223254: C(0):=1.112640536670862472: C(1):=5.2280866355335360415e-02: C(2):=0: C(3):=-1.5569578292261924e-03: b:=n->log(log(A*(B+n^2))): c:=n->sum(C(i)*(b(n))^i, i=0..3): seq(round(fibonacci(4*n, c(n))), n=1..25);
A228065
Difference of consecutive integers nearest to (10^n)/log(10^n) (A057834).
Original entry on oeis.org
4, 18, 123, 941, 7600, 63696, 548039, 4808260, 42826261, 386039540, 3513837172, 32243075171, 297881471562, 2768030763779, 25850862018051, 242481085729315, 2283239371770773, 21572797793887019, 204448571890127322, 1942896366409284492
Offset: 1
For n = 1, A057834(1) - A057834(0) = 4-0 = 4.
Comments