login
A334534
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
25, 28, 128, 225, 293, 678, 725, 742, 749, 4225, 4421, 6225, 8926, 72225, 617371, 1985525, 3679518, 4381824, 6816771, 8572645, 9721317, 43872768, 54639413, 758873243, 5895396725, 7796276839, 8881527332, 9458237492, 9594769255, 9949621217, 25214163187, 31987487294
OFFSET
1,1
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..37 (terms < 3*10^12)
EXAMPLE
25 is a term as p = 2*5 = 10 and (25-10)*(25+10) = 525 which contains '25' as a substring.
8926 is a term as p = 8*9*2*6 = 864 and (8926-864)*(8926+864) = 78926980 which contains '8926' as a substring.
PROG
(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)); ); }
isokd(x, d, n) = {if (x==n, return (1)); my(dx = digits(x)); if (#dx < #d, return (0)); isokp(dx, d); }
isok(n) = {my(d = digits(n), p = vecprod(d)); if (p>0, isokd((n-p)*(n+p), d, n)); } \\ Michel Marcus, May 07 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, May 05 2020
EXTENSIONS
More terms from Giovanni Resta, May 07 2020
STATUS
approved