login
Numbers k such that k = (product of nonzero digits of k) * (sum of digits of k).
7

%I #24 Jul 31 2024 11:49:33

%S 0,1,135,144,1088

%N Numbers k such that k = (product of nonzero digits of k) * (sum of digits of k).

%C Suppose a term k has d digits, then k > 10^(d-1), the product of nonzero digits <= 9^d, and the sum of digits <= 9*d. Since for d >= 85 we have 10^(d-1) > 9^d * (9*d), it follows that d <= 84. That is, the sequence is finite. I've further verified that there are no other terms, that is, the sequence is complete. - _Max Alekseyev_, Jul 29 2024

%H René-Louis Clerc, <a href="https://ut3-toulouseinp.hal.science/hal-04507547">Nombres S+P, maxSP, minSP et |P-S|</a>, hal-04507547 [math.nt], 2024. (In French)

%e (1+0+8+8) * (1*8*8) = 17*64 = 1088, so 1088 belongs to the sequence.

%t Do[ d = Sort[ IntegerDigits[n]]; While[ First[d] == 0, d = Drop[d, 1]]; If[n == Apply[ Plus, d] Apply[ Times, d], Print[n]], {n, 0, 5*10^7} ]

%o (ARIBAS) function a066282(a,b: integer); var n,k,j,p,d: integer; s: string; begin for n := a to b do s := itoa(n); k := 0; p := 1; for j := 0 to length(s) - 1 do d := atoi(s[j..j]); k := k + d; if d > 0 then p := p*d; end; end; if n = p*k then write(n,","); end; end; end; a066282(0,25000).

%o (PARI) a066282(a,b) = local(n,k,q,p,d); for(n=a,b,k=0; p=1; q=n; while(q>0,d=divrem(q,10); q=d[1]; k=k+d[2]; p=p*max(1,d[2])); if(n==p*k,print1(n,", ")))

%o a066282(0,25000)

%Y Fixed points of A062331.

%Y Cf. A023651, A038364, A038369, A062237.

%K base,fini,full,nonn

%O 1,3

%A _Klaus Brockhaus_, Dec 13 2001

%E Offset corrected by _Mohammed Yaseen_, Jul 21 2022

%E Keywords fini,full added by _Max Alekseyev_, Jul 29 2024