login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117229 Number of decimal digits of n in {0,1,4,8,9} 0

%I #29 Aug 30 2014 00:05:39

%S 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,

%T 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,

%U 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

%N Number of decimal digits of n in {0,1,4,8,9}

%C Previous name was "Number of perfect powers A001597 seen in the base 10 representation of n". - _Felix Fröhlich_, Aug 29 2014

%p f:= n -> nops(select(member,convert(n,base,10),{0,1,4,8,9})):

%p map(f,[$0..1000]); # _Robert Israel_, Aug 12 2014

%o (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

%K base,easy,nonn

%O 0,11

%A _Giovanni Teofilatto_, Apr 22 2006

%E New definition by _Robert Israel_ and _Felix Fröhlich_, Aug 08 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)