OFFSET
1,1
LINKS
Travis Scholl, Table of n, a(n) for n = 1..122
Matthew M. Conroy, Worst proof ever
EXAMPLE
64 -> 6+4-1=9 (3) and 6*4+1=25 (5).
187489 -> 1+8+7+4+8+9-1=36 (6) and 1*8*7*4*8*9+1=16129 (127).
MAPLE
P:=proc(n) local i, k, w, y; for i from 1 by 1 to n do w:=0; k:=i^2; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; w:=w-1; y:=1; k:=i^2; while k>0 do y:=y*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; y:=y+1; if w=trunc(sqrt(w))^2 and y=trunc(sqrt(y))^2 and y>1 then print(i^2); fi; od; end: P(50000);
PROG
(PARI) isok(n) = issquare(n) && (d=digits(n)) && vecmin(d) && issquare(vecsum(d)-1) && issquare(prod(k=1, #d, d[k])+1); \\ Michel Marcus, Apr 09 2016
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Jun 11 2008
EXTENSIONS
Name clarified by Travis Scholl, Apr 09 2016
STATUS
approved