login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k>0 such that k = |(product of nonzero digits of k^2) - (sum of digits of k^2)|.
0

%I #17 Apr 21 2024 14:29:25

%S 161,198,1701,604755,629810,4354506,100018736,411505847,

%T 14869757951891,2239397044538572646,40766979086355529727820,

%U 6289762487609138872319999999757

%N Numbers k>0 such that k = |(product of nonzero digits of k^2) - (sum of digits of k^2)|.

%C Most often P-S is strictly positive but to always have an application of N* in N* we prefer to use |P-S| (cf. Clerc).

%H René-Louis Clerc, <a href="https://hal.science/hal-04507547">Nombres S+P, maxSP, minSP et |P-S|</a>, pp. 1-15, 2024.

%e 1701^2 = 2893401, |(2*8*9*3*4*1) - (2+8+9+3+4+1)| = 1728 - 27 = 1701.

%o (PARI) SmP(k,r)=my(d=select(x->(x>0),digits(k^r))); abs(vecsum(d)- vecprod(d)) == k;

%o resuSmP(p,r)={for(k=1,10^p,if(SmP(k,r)==1, print1(k,";")))}

%Y Cf. A038364, A061763.

%K nonn,base,more

%O 1,1

%A _René-Louis Clerc_, Mar 19 2024

%E a(9)-a(12) from _Chai Wah Wu_, Apr 20 2024