login
A117814
a(n) = 1 if at least one of decimal digits of n is a prime, otherwise a(n)=0.
0
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, 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, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1
OFFSET
0,1
COMMENTS
a(n) = 1 if n is a prime.
a(n) = 1 for almost all n. - Charles R Greathouse IV, Feb 26 2013
MATHEMATICA
Table[If[Or@@PrimeQ[IntegerDigits[n]], 1, 0], {n, 0, 140}] (* Harvey P. Dale, Feb 26 2013 *)
PROG
(PARI) a(n)=#select(isprime, digits(n))>0 \\ Charles R Greathouse IV, Feb 26 2013
CROSSREFS
Sequence in context: A156660 A155899 A284932 * A257000 A062301 A374769
KEYWORD
base,easy,nonn
AUTHOR
Giovanni Teofilatto, Apr 29 2006
EXTENSIONS
Corrected by Harvey P. Dale, Feb 26 2013
STATUS
approved