OFFSET
1,1
COMMENTS
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).
LINKS
René-Louis Clerc, Nombres S+P, maxSP, minSP et |P-S|, pp. 1-15, 2024.
EXAMPLE
1701^2 = 2893401, |(2*8*9*3*4*1) - (2+8+9+3+4+1)| = 1728 - 27 = 1701.
PROG
(PARI) SmP(k, r)=my(d=select(x->(x>0), digits(k^r))); abs(vecsum(d)- vecprod(d)) == k;
resuSmP(p, r)={for(k=1, 10^p, if(SmP(k, r)==1, print1(k, "; ")))}
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
René-Louis Clerc, Mar 19 2024
EXTENSIONS
a(9)-a(12) from Chai Wah Wu, Apr 20 2024
STATUS
approved