login
Numbers k such that (k-p)*(k+p) contains k as a substring, where p > 0 and p = A007954(k) is the product of digits of k.
1

%I #24 Jul 17 2021 04:29:28

%S 25,28,128,225,293,678,725,742,749,4225,4421,6225,8926,72225,617371,

%T 1985525,3679518,4381824,6816771,8572645,9721317,43872768,54639413,

%U 758873243,5895396725,7796276839,8881527332,9458237492,9594769255,9949621217,25214163187,31987487294

%N Numbers k such that (k-p)*(k+p) contains k as a substring, where p > 0 and p = A007954(k) is the product of digits of k.

%H Giovanni Resta, <a href="/A334534/b334534.txt">Table of n, a(n) for n = 1..37</a> (terms < 3*10^12)

%e 25 is a term as p = 2*5 = 10 and (25-10)*(25+10) = 525 which contains '25' as a substring.

%e 8926 is a term as p = 8*9*2*6 = 864 and (8926-864)*(8926+864) = 78926980 which contains '8926' as a substring.

%o (PARI) isokp(dx, d) = {if (!#setintersect(Set(dx), Set(d)), return (0)); for (i=1, #dx - #d + 1, if (vector(#d, k, dx[k+i-1]) == d, return(1)););}

%o isokd(x, d, n) = {if (x==n, return (1)); my(dx = digits(x)); if (#dx < #d, return (0)); isokp(dx, d);}

%o isok(n) = {my(d = digits(n), p = vecprod(d)); if (p>0, isokd((n-p)*(n+p), d, n));} \\ _Michel Marcus_, May 07 2020

%Y Cf. A007954, A063108, A028842.

%K nonn,base

%O 1,1

%A _Scott R. Shannon_, May 05 2020

%E More terms from _Giovanni Resta_, May 07 2020