A190223 Numbers all of whose divisors are numbers whose decimal digits are noncomposite numbers (1,2,3,5,7).
1, 2, 3, 5, 7, 11, 13, 15, 17, 21, 22, 23, 25, 31, 33, 35, 37, 51, 53, 55, 71, 73, 75, 77, 111, 113, 115, 121, 125, 127, 131, 137, 151, 155, 157, 173, 175, 211, 213, 217, 221, 223, 227, 231, 233, 251, 253, 257, 271, 275, 277, 311, 313, 317, 331, 337, 353
Offset: 1
Examples
Number 115 is in sequence because all divisors of 115 (1, 5, 23, 115) are numbers whose decimal digits are noncomposite numbers (1,2,3,5,7).
Links
- Iain Fox, Table of n, a(n) for n = 1..10000 (first 1000 terms from G. C. Greubel)
Programs
-
Mathematica
ncnQ[n_]:=Module[{digs=Union[Flatten[IntegerDigits/@Divisors[n]]]}, Complement[ digs,{1,2,3,5,7}]=={}]; Select[ Range[ 400],ncnQ] (* Harvey P. Dale, May 28 2014 *)
-
PARI
is(k) = fordiv(k, d, if(setminus(vecsort(digits(d), , 8), [1, 2, 3, 5, 7]) != [], return(0))); 1 \\ Iain Fox, Dec 28 2017
Extensions
More terms from Harvey P. Dale, May 28 2014
Comments