A257220 Numbers that have at least one divisor containing the digit 3 in base 10.
3, 6, 9, 12, 13, 15, 18, 21, 23, 24, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 45, 46, 48, 51, 52, 53, 54, 57, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 73, 74, 75, 76, 78, 81, 83, 84, 86, 87, 90, 91, 92, 93, 96, 99, 102, 103, 104, 105, 106, 108
Offset: 1
Examples
18 is in sequence because the list of divisors of 18: (1, 2, 3, 6, 9, 18) contains digit 3.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[n: n in [1..1000] | [3] subset Setseq(Set(Sort(&cat[Intseq(d): d in Divisors(n)])))];
-
Mathematica
Select[Range@108, Part[Plus @@ DigitCount@ Divisors@ #, 3] > 0 &] (* Michael De Vlieger, Apr 20 2015 *)
-
PARI
is(n)=fordiv(n,d, if(setsearch(Set(digits(d)),3), return(1))); 0 \\ Charles R Greathouse IV, Apr 30 2015
Formula
a(n) ~ n. - Charles R Greathouse IV, Apr 30 2015
Comments