login
Numbers n such that (n + digit sum of n) and (n + digit product of n) are nontrivial permutations of the digits of n.
0

%I #11 May 22 2025 10:21:40

%S 5769,14346,27369,41346,52569,56925,94725,122346,126135,129213,143658,

%T 152469,154269,155169,157914,162135,192213,212346,216135,219213,

%U 221346,236124,238959,245925,261135,263124,291213,326124,328536,344925,361647,362124,367425,368892,392436,413658

%N Numbers n such that (n + digit sum of n) and (n + digit product of n) are nontrivial permutations of the digits of n.

%C All the digit sums and the digit products are multiples of 9.

%e 5769 + (5+7+6+9) = 5796 and 5769 + (5*7*6*9) = 7659. Thus 5769 is a member of this sequence.

%o (PARI)

%o 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,", ")))

%o (Python)

%o from operator import mul

%o from functools import reduce

%o A246421_list = []

%o for n in range(1,10**6):

%o s = str(n)

%o if not s.count('0'):

%o s2 = sorted(s)

%o 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)))):

%o A246421_list.append(n) # _Chai Wah Wu_, Sep 07 2014

%Y Cf. A007954, A007953, A243102, A246420.

%K nonn,base

%O 1,1

%A _Derek Orr_, Aug 25 2014