OFFSET
1,2
COMMENTS
Besides multiples of 10, 625 and its odd multiples have a(n)=0. Based on comment by Robert Israel in A078239. - Andrew Howroyd, Sep 17 2024
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
PROG
(PARI) a(n)={if(n%10==0||n%1250==625, 0, if(n==1, 1, my(S=Set([2, 3, 5, 7])); forstep(m=n, oo, n, my(d=digits(m)); if(0 == #if(isprime(n), select(t->t==1||setsearch(S, t), d), select(t->!setsearch(S, t), d)), return(m)))))} \\ Andrew Howroyd, Sep 17 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Nov 24 2002
EXTENSIONS
a(13) corrected and a(29) onwards from Andrew Howroyd, Sep 17 2024
STATUS
approved