OFFSET
1,2
COMMENTS
Has A050278 as subsequence.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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:
select(filter, [$1..500]); # Robert Israel, Mar 06 2020
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
Eric Angelini, Jun 15 2005
EXTENSIONS
Edited and corrected by Stefan Steinerberger, Jun 30 2007
STATUS
approved