|
|
A246421
|
|
Numbers n such that (n + digit sum of n) and (n + digit product of n) are nontrivial permutations of the digits of n.
|
|
0
|
|
|
5769, 14346, 27369, 41346, 52569, 56925, 94725, 122346, 126135, 129213, 143658, 152469, 154269, 155169, 157914, 162135, 192213, 212346, 216135, 219213, 221346, 236124, 238959, 245925, 261135, 263124, 291213, 326124, 328536, 344925, 361647, 362124, 367425, 368892, 392436, 413658
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
All the digit sums and the digit products are multiples of 9.
|
|
LINKS
|
|
|
EXAMPLE
|
5769 + (5+7+6+9) = 5796 and 5769 + (5*7*6*9) = 7659. Thus 5769 is a member of this sequence.
|
|
PROG
|
(PARI)
for(n=1, 10^7, d=digits(n); p=prod(i=1, #d, d[i]); if(p&&vecsort(d)==vecsort(digits(n+p))&&vecsort(d)==vecsort(digits(n+sumdigits(n))), print1(n, ", ")))
(Python)
from operator import mul
from functools import reduce
for n in range(1, 10**6):
....s = str(n)
....if not s.count('0'):
........s2 = sorted(s)
........if s2 == sorted(str(n+sum(int(d) for d in s))) and s2 == sorted(str(n+reduce(mul, (int(d) for d in s)))):
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|