|
|
A108193
|
|
Numbers n such that n shares at least one digit with both the sum of its digits and the product of its digits.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 20, 30, 40, 50, 60, 70, 80, 90, 91, 100, 109, 118, 119, 127, 128, 129, 136, 137, 146, 155, 157, 159, 163, 164, 166, 168, 172, 173, 175, 181, 182, 186, 190, 191, 192, 195, 199, 200, 208, 217, 218, 219, 228
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
238 shares the digit 3 with the sum of its digits (13) and shares the digit 8 with the product of its digits (48).
|
|
MAPLE
|
filter:= proc(n) local L, S, Ss, Sp;
L:= convert(n, base, 10);
S:= convert(L, set);
Ss:= convert(convert(convert(L, `+`), base, 10), set);
if S intersect Ss = {} then return false fi;
Sp:= convert(convert(convert(L, `*`), base, 10), set);
S intersect Sp <> {}
end proc:
|
|
MATHEMATICA
|
Select[Range[0, 250], Length[Intersection[IntegerDigits[ # ], IntegerDigits[ Plus @@ IntegerDigits[ # ]]]] > 0 && Length[Intersection[IntegerDigits[ # ], IntegerDigits[Times @@ IntegerDigits[ # ]]]] > 0 &]
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|