login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A117229
Number of decimal digits of n in {0,1,4,8,9}
0
1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 3, 3, 2, 2, 3
OFFSET
0,11
COMMENTS
Previous name was "Number of perfect powers A001597 seen in the base 10 representation of n". - Felix Fröhlich, Aug 29 2014
MAPLE
f:= n -> nops(select(member, convert(n, base, 10), {0, 1, 4, 8, 9})):
map(f, [$0..1000]); # Robert Israel, Aug 12 2014
PROG
(PARI) a(n, v= [1, 1, 0, 0, 1, 0, 0, 0, 1, 1]) = {if (!n, return (1)); d = digits(n); sum(i=1, #d, v[d[i]+1]); } \\ Michel Marcus, Aug 10 2014
CROSSREFS
Sequence in context: A376604 A241418 A330348 * A264119 A225518 A269972
KEYWORD
base,easy,nonn
AUTHOR
Giovanni Teofilatto, Apr 22 2006
EXTENSIONS
New definition by Robert Israel and Felix Fröhlich, Aug 08 2014
STATUS
approved