login
A243102
Numbers k such that the digits of (k + product of digits of k) are a nontrivial permutation of the digits of k.
2
239, 326, 364, 497, 563, 598, 613, 637, 695, 819, 1239, 1326, 1364, 1497, 1563, 1598, 1613, 1637, 1695, 1819, 2139, 2313, 2356, 2369, 2419, 2594, 2639, 2791, 3126, 3213, 3235, 3238, 3259, 3354, 3365, 3561, 4219, 4346, 4353, 4395, 4559, 4569, 4592, 4595, 4719, 4953, 4967, 5129, 5233
OFFSET
1,1
COMMENTS
The product of digits must be divisible by 9, but is not 0. - Robert Israel, Aug 24 2014
LINKS
EXAMPLE
239 + 2*3*9 = 293 is a permutation of the digits of 239. Thus 239 is a member of this sequence.
MAPLE
filter:= proc(n)
local L, m;
L:= convert(n, base, 10);
m:= convert(L, `*`);
if m=0 then return false fi;
sort(L) = sort(convert(n+m, base, 10));
end proc:
select(filter, [$1..1000]); # Robert Israel, Aug 24 2014
MATHEMATICA
Cases[{#, DigitCount@#} & /@ (If[(prod = Times @@ IntegerDigits@#) == 0 || Mod[prod, 9] != 0, Nothing, # + {0, prod}] & /@ Range@7500), {{x_, _}, {y_, y_}} :> x] (* Hans Rudolf Widmer, Aug 24 2024 *)
PROG
(PARI) for(n=1, 10^5, d=digits(n); p=prod(i=1, #d, d[i]); v=digits(n+p); if(v!=d, v=vecsort(v); d=vecsort(d); if(v==d, print1(n, ", "))))
(Python)
from operator import mul
from functools import reduce
A243102 = [int(n) for n in (str(x) for x in range(1, 10**5)) if not n.count('0') and sorted(str(int(n)+reduce(mul, (int(d) for d in n)))) == sorted(n)]
# Chai Wah Wu, Aug 26 2014
CROSSREFS
Cf. A007954.
Sequence in context: A140032 A289109 A247888 * A294092 A056086 A046012
KEYWORD
nonn,base
AUTHOR
Derek Orr, Aug 19 2014
EXTENSIONS
Definition edited by Robert Israel, Aug 24 2014
STATUS
approved