OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
388 is a term because 388-(3*8*8) = 196 = 14^2.
MAPLE
a:= proc(n) option remember; local d, k, m;
for k from 1+`if`(n=1, 0, a(n-1)) do
d, m:= 1, k;
while m>0 do d:=d*irem(m, 10, 'm') od;
if issqr(k-d) then return k fi
od
end:
seq(a(n), n=1..100); # Alois P. Heinz, Aug 19 2013
PROG
(PARI) for(n=0, 10^4, d=digits(n); p=prod(i=1, #d, d[i]); if(issquare(n-p), print(n, ", "))) \\ Derek Orr, Mar 13 2015
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Derek Orr, Aug 15 2013
STATUS
approved