[go: up one dir, main page]

login
Search: a085981 -id:a085981
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
OFFSET
1,169
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 1's A085975, 2's A085976, 3's A085977, 4's A085978, 5's A085979, 6's A085980, 7's A085981, 8's A085982, 9's A085983.
Cf. A055641.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,48
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 1's A085975, 3's A085977, 4's A085978, 5's A085979, 6's A085980, 7's A085981, 8's A085982, 9's A085983.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,5
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 2's A085976, 3's A085977, 4's A085978, 5's A085979, 6's A085980, 7's A085981, 8's A085982, 9's A085983.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,51
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 1's A085975, 2's A085976, 4's A085978, 5's A085979, 6's A085980, 7's A085981, 8's A085982, 9's A085983.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,86
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 1's A085975, 2's A085976, 3's A085977, 5's A085979, 6's A085980, 7's A085981, 8's A085982, 9's A085983.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,102
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 1's A085975, 2's A085976, 3's A085977, 4's A085978, 6's A085980, 7's A085981, 8's A085982, 9's A085983.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,121
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 1's A085975, 2's A085976, 3's A085977, 4's A085978, 5's A085979, 7's A085981, 8's A085982, 9's A085983.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,152
LINKS
MATHEMATICA
DigitCount[Prime[Range[150]], 10, 8](* Harvey P. Dale, Jun 11 2016 *)
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 1's A085975, 2's A085976, 3's A085977, 4's A085978, 5's A085979, 6's A085980, 7's A085981, 9's A085983.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved
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
OFFSET
1,46
LINKS
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
-- Reinhard Zumkeller, Apr 08 2014
CROSSREFS
Cf. 0's A085974, 1's A085975, 2's A085976, 3's A085977, 4's A085978, 5's A085979, 6's A085980, 7's A085981, 8's A085982.
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jul 06 2003
STATUS
approved

Search completed in 0.008 seconds