A241141 Numbers n such that n and 5n share at least one digit.
5, 10, 15, 19, 20, 21, 24, 25, 30, 31, 35, 39, 40, 42, 45, 48, 49, 50, 51, 52, 53, 55, 57, 59, 60, 63, 65, 70, 73, 74, 75, 79, 80, 84, 85, 90, 94, 95, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 110, 115, 119, 120, 122, 123, 124, 125, 126, 130, 135, 136, 139, 140, 142, 143, 145, 147, 148, 149, 150, 151, 153
Offset: 1
Examples
19 is in the sequence since 19 and 5*19 = 95 and together they share the digit 9.
Programs
-
Mathematica
fQ[n_] := Intersection[ IntegerDigits[ n], IntegerDigits[5 n]] != {} && Mod[n, 5] != 0; Select[ Range[ 100], fQ]
-
PARI
isok(n) = #setintersect(Set(digits(n)), Set(digits(5*n))); \\ Michel Marcus, Apr 17 2014
Comments