A074157 Smallest multiple of n which uses no digits of n, or 0 if no such number exists.
2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 22, 36, 26, 28, 30, 32, 34, 36, 38, 0, 63, 44, 46, 96, 100, 78, 54, 56, 58, 0, 62, 64, 66, 68, 70, 72, 111, 76, 78, 0, 82, 168, 86, 88, 90, 92, 188, 96, 588, 0, 204, 104, 106, 108, 110, 112, 114, 116, 118, 0, 244, 310, 189, 128
Offset: 1
Links
- Michel Marcus, Table of n, a(n) for n = 1..1000
Programs
-
PARI
a(n) = if(!(n%10), return(0)); my(dn = Set(digits(n))); if(#dn==10 || (#dn==9 && dn[1]==1), return(0)); if(!(n%5) && !dn[1], return(0)); if(!(n%2), my(v=setminus([0, 2, 4, 6, 8], dn)); if(!#v || (#v==1 && #dn==9 && valuation(n, 2)>valuation(v[1], 2)) || (v==[2, 6] && #dn==8 && valuation(n, 2)>1), return(0))); forstep(m=2*n, oo, n, if(!#setintersect(Set(digits(m)), dn), return(m))); \\ Michel Marcus, Aug 04 2017 (Corrected by Jinyuan Wang, Jun 15 2025)
Extensions
a(24) and a(49) corrected by Michel Marcus, Aug 04 2017
Comments