Displaying 1-9 of 9 results found.
page
1
Number of 0's in the decimal expansion of prime(n).
+10
11
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0
EXAMPLE
prime(26) = 101, so a(26) = 1 and prime(1230) = 10007, so a(1230) = 3.
MATHEMATICA
DigitCount[Prime[Range[100]], 10, 0] (* Paolo Xausa, Oct 30 2023 *)
PROG
(Haskell)
a085974 = count0 0 . a000040 where
count0 c x | d == 0 = if x < 10 then c + 1 else count0 (c + 1) x'
| otherwise = if x < 10 then c else count0 c x'
where (x', d) = divMod x 10
Number of 2's in decimal expansion of prime(n).
+10
11
1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0
EXAMPLE
prime(4) = 7, so a(4)=0 and prime(2490) = 22229, so a(2490)=4.
MATHEMATICA
DigitCount[Prime[Range[110]], 10, 2] (* Harvey P. Dale, Jan 14 2014 *)
PROG
(Haskell)
a085976 = count2 0 . a000040 where
count2 c x | d == 2 = if x < 10 then c + 1 else count2 (c + 1) x'
| otherwise = if x < 10 then c else count2 c x'
where (x', d) = divMod x 10
Number of 1's in decimal expansion of prime(n).
+10
10
0, 0, 0, 0, 2, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1
EXAMPLE
prime(5) = 11, so a(5)=2 and prime(1242) = 10111, so a(1242)=4.
MATHEMATICA
DigitCount[Prime[Range[100]], 10, 1] (* Paolo Xausa, Oct 30 2023 *)
PROG
(Haskell)
a085975 = count1 0 . a000040 where
count1 c x | d == 1 = if x < 10 then c + 1 else count1 (c + 1) x'
| otherwise = if x < 10 then c else count1 c x'
where (x', d) = divMod x 10
Number of 3's in decimal expansion of prime(n).
+10
10
0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0
EXAMPLE
prime(2) = 3, so a(2)=1 and prime(345) = 2333, so a(345)=3.
MATHEMATICA
DigitCount[Prime[Range[110]], 10, 3] (* Harvey P. Dale, Aug 05 2019 *)
PROG
(Haskell)
a085977 = count3 0 . a000040 where
count3 c x | d == 3 = if x < 10 then c + 1 else count3 (c + 1) x'
| otherwise = if x < 10 then c else count3 c x'
where (x', d) = divMod x 10
Number of 4's in decimal expansion of prime(n).
+10
10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0
MATHEMATICA
DigitCount[#, 10, 4]&/@Prime[Range[110]] (* Harvey P. Dale, May 30 2021 *)
PROG
(Haskell)
a085978 = count4 0 . a000040 where
count4 c x | d == 4 = if x < 10 then c + 1 else count4 (c + 1) x'
| otherwise = if x < 10 then c else count4 c x'
where (x', d) = divMod x 10
Number of 5's in decimal expansion of prime(n).
+10
10
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1
MATHEMATICA
DigitCount[Prime[Range[100]], 10, 5] (* Paolo Xausa, Oct 30 2023 *)
PROG
(Haskell)
a085979 = count5 0 . a000040 where
count5 c x | d == 5 = if x < 10 then c + 1 else count5 (c + 1) x'
| otherwise = if x < 10 then c else count5 c x'
where (x', d) = divMod x 10
Number of 6's in decimal expansion of prime(n).
+10
10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0
MATHEMATICA
Table[DigitCount[n, 10, 6], {n, Prime[Range[110]]}] (* Harvey P. Dale, Mar 20 2018 *)
PROG
(Haskell)
a085980 = count6 0 . a000040 where
count6 c x | d == 6 = if x < 10 then c + 1 else count6 (c + 1) x'
| otherwise = if x < 10 then c else count6 c x'
where (x', d) = divMod x 10
Number of 8's in decimal expansion of prime(n).
+10
10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
PROG
(Haskell)
a085982 = count8 0 . a000040 where
count8 c x | d == 8 = if x < 10 then c + 1 else count8 (c + 1) x'
| otherwise = if x < 10 then c else count8 c x'
where (x', d) = divMod x 10
Number of 9's in decimal expansion of prime(n).
+10
10
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0
MATHEMATICA
DigitCount[#, 10, 9]&/@Prime[Range[110]] (* Harvey P. Dale, May 08 2018 *)
PROG
(Haskell)
a085983 = count9 0 . a000040 where
count9 c x | d == 9 = if x < 10 then c + 1 else count9 (c + 1) x'
| otherwise = if x < 10 then c else count9 c x'
where (x', d) = divMod x 10
Search completed in 0.008 seconds
|