[go: up one dir, main page]

login
Search: a045714 -id:a045714
     Sort: relevance | references | number | modified | created      Format: long | short | data
Primes with first digit 5.
+10
29
5, 53, 59, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261
OFFSET
1,1
COMMENTS
Subsequence of A000040.
LINKS
MATHEMATICA
Select[Table[Prime[n], {n, 5300}], First[IntegerDigits[#]]==5 &] (* Vincenzo Librandi, Aug 08 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(5300) | Intseq(p)[#Intseq(p)] eq 5]; // Vincenzo Librandi, Aug 08 2014
CROSSREFS
Column k=5 of A262369.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
Leading 5 added by Jaroslav Krizek, Apr 29 2010
STATUS
approved
Primes with first digit 1.
+10
27
11, 13, 17, 19, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151
OFFSET
1,1
COMMENTS
Also primes with all divisors starting with digit 1. Complement of A206288 (nonprime numbers with all divisors starting with digit 1) with respect to A206287 (numbers with all divisors starting with digit 1). - Jaroslav Krizek, Mar 04 2012
Cohen and Katz show that the set of primes with first digit 1 has no natural density, but has supernatural/Dirichlet density log_{10} (2) ~= 0.3, the primes with first digit 2 have (supernatural) density log_{10} (3/2) ~= 0.176, ... and the primes with first digit 9 have density log_{10} (10/9) ~= 0.046. This would seem to explain the first digit phenomenon. Note that sum_{k = 1}^9 log_{10} (k+1)/k = 1. - Gary McGuire, Dec 22 2004
Lower density is 1/9, upper density is 5/9. The Dirichlet density, if it exists, is always between the lower and upper density (as it does and is in this case). - Charles R Greathouse IV, Sep 26 2022
LINKS
Daniel I. A. Cohen and Talbot M. Katz, Prime numbers and the first digit phenomenon, J. Number Theory 18 (1984), 261-268.
MATHEMATICA
Select[Table[Prime[n], {n, 500}], First[IntegerDigits[#]] == 1 &]
Flatten[Table[Prime[Range[PrimePi[10^n] + 1, PrimePi[2 * 10^n]]], {n, 3}]] (* Alonso del Arte, Jul 18 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(10^4) | IsOne(Intseq(p)[#Intseq(p)])]; // Bruno Berselli, Jul 19 2014
(PARI) list(lim)=my(v=[]); for(d=1, #digits(lim\=1)-1, v=concat(v, primes([10^d, min(lim, 2*10^d-1)]))); v \\ Charles R Greathouse IV, Sep 26 2022
CROSSREFS
For primes with initial digit d (1 <= d <= 9) see A045707 (1, this sequence), A045708 (2), A045709 (3), A045710 (4), A045711 (5), A045712 (6), A045713 (7), A045714 (8), A045715 (9).
Column k=1 of A262369.
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
Cohen-Katz reference from Victor S. Miller, Dec 21 2004
STATUS
approved
Primes with first digit 2.
+10
24
2, 23, 29, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221
OFFSET
1,1
LINKS
FORMULA
See A045707 for comments on density of these sequences.
MATHEMATICA
Select[Table[Prime[n], {n, 3000}], First[IntegerDigits[#]]==2 &] (* Vincenzo Librandi, Aug 08 2014 *)
PROG
(Haskell)
a045708 n = a045708_list !! (n-1)
a045708_list = filter ((== 2) . a000030) a000040_list
-- Reinhard Zumkeller, Mar 16 2012
(Magma) [p: p in PrimesUpTo(2300) | Intseq(p)[#Intseq(p)] eq 2]; // Vincenzo Librandi, Aug 08 2014
(Python)
from sympy import isprime
def agen(limit=float('inf')):
yield 2
digits, adder = 1, 20
while True:
for i in range(1, 10**digits, 2):
test = adder + i
if test > limit: return
if isprime(test): yield test
digits, adder = digits+1, adder*10
agento = lambda lim: agen(limit=lim)
print(list(agento(2222))) # Michael S. Branicky, Feb 23 2021
CROSSREFS
Cf. A000040.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
Cf. A000030, subsequence of A208272.
Column k=2 of A262369.
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
Offset fixed by Reinhard Zumkeller, Mar 15 2012
STATUS
approved
Number of primes less than 10^n with initial digit 1.
+10
24
0, 4, 25, 160, 1193, 9585, 80020, 686048, 6003530, 53378283, 480532488, 4369582734, 40063566855, 369893939287, 3435376839800, 32069022099022, 300694113015105, 2830466318006780, 26735673312004455, 253315661161665338, 2406763761677705769, 22923886160712831134, 218839439542390117580
OFFSET
0,2
LINKS
Chris K. Caldwell, How Many Primes Are There?
Xavier Gourdon & Pascal Sebah, Counting the number of primes
Henri Lifchitz, Parity of Pi(n)
EXAMPLE
a(2)=4 because there are 4 primes up to 10^2 whose initial digit is 1 (11, 13, 17 and 19).
MATHEMATICA
f[n_] := f[n] = PrimePi[2*10^n] - PrimePi[10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 13}]
CROSSREFS
Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
KEYWORD
base,hard,nonn
AUTHOR
Shyam Sunder Gupta, Aug 14 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(21) added by David Baugh, Mar 21 2015
a(22) from Chai Wah Wu, Sep 18 2018
STATUS
approved
Primes with first digit 3.
+10
23
3, 31, 37, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229
OFFSET
1,1
LINKS
MATHEMATICA
Select[Table[Prime[n], {n, 4000}], First[IntegerDigits[#]]==3 &] (* Vincenzo Librandi, Aug 08 2014 *)
PROG
(PARI) isok(n) = isprime(n) && (digits(n, 10)[1] == 3) \\ Michel Marcus, Jun 08 2013
(Magma) [p: p in PrimesUpTo(3300) | Intseq(p)[#Intseq(p)] eq 3]; // Vincenzo Librandi, Aug 08 2014
CROSSREFS
Cf. A000040.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
Column k=3 of A262369.
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
STATUS
approved
Number of primes less than 10^n with initial digit 9.
+10
23
0, 1, 15, 127, 1006, 8230, 70320, 614821, 5453140, 48982456, 444608278, 4070532710, 37535715441, 348245215460, 3247889171908, 30429496751905, 286235215995588, 2702000272361599, 25586688305447928, 242978340446949438, 2313264023790027111, 22074118786158858975
OFFSET
1,3
EXAMPLE
a(2) = 1 because there is 1 prime less than 100 whose initial digit is 9, i.e., 97.
MATHEMATICA
f[n_] := f[n] = PrimePi[10^(n + 1)] - PrimePi[9*10^n] + f[n - 1]; f[0] = 0; Table[f[n], {n, 0, 12}]
CROSSREFS
A006880(n) = A073509(n)+ ... + A073516(n)+A073517(n-1).
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
KEYWORD
base,hard,nonn
AUTHOR
Shyam Sunder Gupta, Aug 14 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015
STATUS
approved
Number of primes less than 10^n with initial digit 8.
+10
23
0, 2, 17, 127, 1003, 8326, 71038, 618610, 5481646, 49221187, 446590932, 4087194991, 37677478288, 349465615584, 3258501713644, 30522628848972, 287059041039078, 2709339704446862, 25652489700275636, 243571629996128384, 2318640708958531064, 22123070798400775157
OFFSET
1,2
EXAMPLE
a(2)=2 because there are 2 primes up to 10^2 whose initial digit is 8 (namely 83 and 89).
MATHEMATICA
f[n_] := f[n] = PrimePi[9*10^n] - PrimePi[8*10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 12}]
CROSSREFS
A006880(n) = A073509(n)+ ... + A073516(n)+A073517(n-1).
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
KEYWORD
base,hard,nonn
AUTHOR
Shyam Sunder Gupta, Aug 14 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015
STATUS
approved
Number of primes less than 10^n with initial digit 7.
+10
23
1, 4, 18, 125, 1027, 8435, 71564, 622882, 5516130, 49495432, 448855139, 4106164356, 37838546363, 350849788546, 3270531245684, 30628143485953, 287992070079777, 2717649138419586, 25726964404879666, 244242934202964444, 2324722877951987037, 22178433287546997612
OFFSET
1,2
EXAMPLE
a(2)=4 because there are 4 primes up to 10^2 whose initial digit is 7 (namely 7, 71, 73 and 79).
MATHEMATICA
f[n_] := f[n] = PrimePi[8*10^n] - PrimePi[7*10^n] + f[n - 1]; f[0] = 1; Table[ f[n], {n, 0, 12}]
CROSSREFS
Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
KEYWORD
base,hard,nonn
AUTHOR
Shyam Sunder Gupta, Aug 14 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015
STATUS
approved
Number of primes less than 10^n with initial digit 6.
+10
23
0, 2, 18, 135, 1013, 8458, 72257, 628206, 5556434, 49815418, 451476802, 4128049326, 38024311091, 352446754137, 3284400373590, 30749731897370, 289066731934716, 2727216210298152, 25812680778645432, 245015325044029789, 2331718909954888809, 22242097596092999144
OFFSET
1,2
EXAMPLE
a(2)=2 because there are 2 primes up to 10^2 whose initial digit is 2 (namely 61 and 67).
MATHEMATICA
f[n_] := f[n] = PrimePi[7*10^n] - PrimePi[6*10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 12}]
CROSSREFS
Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
KEYWORD
base,hard,nonn
AUTHOR
Shyam Sunder Gupta, Aug 14 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015
STATUS
approved
Number of primes less than 10^n with initial digit 5.
+10
23
1, 3, 17, 131, 1055, 8615, 72951, 633932, 5602768, 50193913, 454577490, 4153943134, 38243708524, 354330372215, 3300752009165, 30892997367352, 290332329192655, 2738477783884855, 25913537508233527, 245923809778144431, 2339944887042508496, 22316931815316988517
OFFSET
1,2
EXAMPLE
a(2)=3 because there are 3 primes up to 10^2 whose initial digit is 5 (namely 5, 53 and 59).
MATHEMATICA
f[n_] := f[n] = PrimePi[6*10^n] - PrimePi[5*10^n] + f[n - 1]; f[0] = 1; Table[ f[n], {n, 0, 13}]
CROSSREFS
Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509
KEYWORD
base,hard,nonn
AUTHOR
Shyam Sunder Gupta, Aug 14 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015
STATUS
approved

Search completed in 0.019 seconds