%I #7 Feb 26 2013 12:49:35
%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
|