login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117814 a(n) = 1 if at least one of decimal digits of n is a prime, otherwise a(n)=0. 0

%I

%S 0,0,1,1,0,1,0,1,0,0,0,0,1,1,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,

%T 1,1,1,1,1,1,0,0,1,1,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,1,0,1,

%U 0,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,1

%N a(n) = 1 if at least one of decimal digits of n is a prime, otherwise a(n)=0.

%C a(n) = 1 if n is a prime.

%C a(n) = 1 for almost all n. - _Charles R Greathouse IV_, Feb 26 2013

%t Table[If[Or@@PrimeQ[IntegerDigits[n]],1,0],{n,0,140}] (* _Harvey P. Dale_, Feb 26 2013 *)

%o (PARI) a(n)=#select(isprime,digits(n))>0 \\ _Charles R Greathouse IV_, Feb 26 2013

%K base,easy,nonn

%O 0,1

%A _Giovanni Teofilatto_, Apr 29 2006

%E Corrected by _Harvey P. Dale_, Feb 26 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 22:22 EDT 2019. Contains 322291 sequences. (Running on oeis4.)