login
A316866
Number of times 5 appears in decimal expansion of n.
7
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0,56
EXAMPLE
a(0) = 0 since the decimal representation of 0 does not contain the digit 5.
a(5) = 1 since 5 appears once in the decimal expansion of 5.
MATHEMATICA
Array[ DigitCount[#, 10, 5] &, 105, 0]
PROG
(PARI) a(n) = #select(x->x==5, digits(n)); \\ Michel Marcus, Jul 20 2018
KEYWORD
base,easy,nonn
AUTHOR
Robert G. Wilson v, Jul 15 2018
STATUS
approved