login
A371338
Numbers k>0 such that k = |(product of nonzero digits of k^2) - (sum of digits of k^2)|.
0
161, 198, 1701, 604755, 629810, 4354506, 100018736, 411505847, 14869757951891, 2239397044538572646, 40766979086355529727820, 6289762487609138872319999999757
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
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
Sequence in context: A249397 A025350 A025342 * A189639 A348426 A298615
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