OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
254 has divisors 1, 2, 127 and 254, all of which contain the digit 2.
MATHEMATICA
fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 1300], fQ[#, 2] &] (* Robert G. Wilson v, Jun 11 2014 *)
PROG
(Magma) [k:k in [2..1300]| forall{d:d in Set(Divisors(k)) diff {1}| 2 in Intseq(d)}]; // Marius A. Burtea, Nov 07 2019
(PARI) has2(n)=if(n==1, return(1)); !!setsearch(Set(digits(n)), 2)
is(n)=fordiv(n, d, if(!has2(d), return(0))); 1 \\ Charles R Greathouse IV, Jan 24 2020
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Erich Friedman, Jul 04 2001
EXTENSIONS
Offset corrected by Amiram Eldar, Nov 07 2019
STATUS
approved