Original entry on oeis.org
2, 13, 87, 631, 4884, 39876, 336756, 2914140, 25683614, 229595323, 2075911061, 18944394204, 174219183788, 1612626081244, 15010195375589, 140387627837380, 1318553324421089, 12430152478650578, 117566893367826528, 1115249538463126642, 10607400237283187171, 101131327003506262770, 966289700136857769743
Offset: 1
Below 10^1 there are 4 primes: 2 + 3 + 5 + 7 = 17. The rounded mean is 17/4 =~ 4. There are 2 primes less than 4: 2 and 3, so a(1) = 2.
A092850
Number of primes between A092800(n) and 10^n.
Original entry on oeis.org
2, 12, 81, 598, 4708, 38622, 327823, 2847315, 25163920, 225457188, 2042143752, 18663517814, 171846353051, 1592315669558, 14834375047080, 138850713196545, 1305003833233144, 12309801809090282, 116490773908518079, 1105570064097792198, 10519869248735544757, 100335959685809643520
Offset: 1
Below 10^1 there are 4 primes: 2 + 3 + 5 + 7 = 17. The rounded mean is 17/4 =~ 4. There are 2 primes > 4: 5 and 7, so a(1) = 2.
A092802
Mean (rounded) of composite numbers below 10^n.
Original entry on oeis.org
7, 53, 510, 5047, 50279, 501844, 5012809, 50094049, 500720912, 5005703554, 50046261712, 500382762350, 5003219541311, 50027458290511, 500236958622730, 5002065769284422, 50018168989895296, 500161047150051653, 5001437349858735047, 50012907314623137795, 500116546694296773760
Offset: 1
a(3) = 510 because the mean of composites below 10^3 is 510.087... .
A091716
Standard deviation (rounded) of primes below 10^n.
Original entry on oeis.org
2, 29, 298, 2962, 29412, 292821, 2921863, 29170821, 291324189, 2910238255, 29078387910, 290589147156, 2904276036695
Offset: 1
a(6) = 292821 (rounded from 292820.634) because this is the computed and rounded sample standard deviation of the 78498 primes below 10^6.
- John E. Freund, Modern elementary statistics, 5th ed. (Prentice-Hall, 1979), pp. 42-47
-
seq(round(Statistics:-StandardDeviation(select(isprime, [$2 .. 10^n-1]))),n=1..7); # Robert Israel, Sep 23 2014
A092851
Difference in count of primes <= mean and > mean below 10^n in A092849 and A092850.
Original entry on oeis.org
0, 1, 6, 33, 176, 1254, 8933, 66825, 519694, 4138135, 33767309, 280876390, 2372830737, 20310411686, 175820328509, 1536914640835, 13549491187945, 120350669560296, 1076119459308449, 9679474365334444, 87530988547642414, 795367317696619250
Offset: 1
a(3) = 6 because the count at 10^3 in A092849 is 87 and in A092850 it is 81. 87 - 81 = 6.
A377571
a(n) is a n-digit number; for k = 1..n, its k-th digit is the most frequent k-th digit among n-digit prime numbers; in case of a tie, preference is given to the least digit.
Original entry on oeis.org
2, 13, 157, 1223, 12127, 104993, 1000597, 10289067, 100080553, 1000447633, 10015225131
Offset: 1
For n = 4: the frequency of digits among 4-digit prime numbers, and the corresponding most frequent digits, are:
Digit 0 1 2 3 4 5 6 7 8 9 Most frequent
----- --- ---- ---- ---- --- --- --- --- --- --- -------------
1st 0 135* 127 120 119 114 117 107 110 112 1
2nd 112 95 116* 104 104 107 115 104 106 98 2
3rd 105 107 116* 110 103 106 104 101 105 104 2
4th 0 266 0 268* 0 0 0 262 0 265 3
- so a(4) = 1223.
-
a(n, base = 10) = { my (f = vector(n, k, vector(base))); forprime (p = base^(n-1), base^n-1, my (d = digits(p, base)); for (k = 1, n, f[k][1+d[k]]++;);); my (b = vector(n), i); for (k = 1, n, vecmax(f[k], &i); b[k] = i-1;); fromdigits(b, base); }
-
from sympy import primerange
def A377571(n):
c = [[0]*10 for i in range(n)]
for p in primerange(10**(n-1),10**n):
for i, j in enumerate(str(p)):
c[i][int(j)]+=1
return int(''.join(str(c[i].index(max(c[i]))) for i in range(n))) # Chai Wah Wu, Nov 06 2024
Showing 1-6 of 6 results.
Comments