login
Numbers n for which there are exactly four k such that n = k + (product of nonzero digits of k).
8

%I #4 Oct 12 2022 17:00:26

%S 116,405,430,474,530,546,642,744,774,836,854,855,930,958,1038,1055,

%T 1070,1088,1104,1110,1116,1134,1154,1162,1236,1366,1400,1405,1418,

%U 1430,1455,1530,1642,1744,1774,1836,1854,1855,1930,1958,2112,2137,2185,2199,2205

%N Numbers n for which there are exactly four k such that n = k + (product of nonzero digits of k).

%e 279, 345, 381 and 401 are the only four k such that k + (product of nonzero digits of k) = 405, hence 405 is a term.

%t Take[Select[Tally[Table[k+Times@@(IntegerDigits[k]/.(0->1)),{k,100000}]],#[[2]] == 4&][[All,1]]//Sort,50] (* _Harvey P. Dale_, Oct 12 2022 *)

%o (PARI) {c=4;z=2210;v=vector(z);for(n=1,z+1,k=addpnd(n);if(k<=z,v[k]=v[k]+1));for(j=1,length(v),if(v[j]==c,print1(j,",")))} \\for function addpnd see A096922

%Y Cf. A063114, A096347, A096922 - A096924, A096926 - A096931.

%K nonn,base

%O 1,1

%A _Klaus Brockhaus_, Jul 15 2004