OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
1027^2 + 1054729, a 7-digit number whose digit sum is 1+0+5+4+7+2+9 = 28 = 4*7, so 1054729 is a term.
10044^2 = 100881936, a 9-digit number whose digit sum is 1+0+0+8+8+1+9+3+6 = 36 = 4*9, so 100881936 is a term.
MAPLE
f:= proc(n) local L;
L:= convert(n^2, base, 10);
if convert(L, `+`)=4*nops(L) then n^2 fi
end proc:
map(f, [$1..2000]); # Robert Israel, Jul 05 2018
MATHEMATICA
Select[Range[1500]^2, Mean[IntegerDigits[#]] == 4 &] (* Giovanni Resta, Jul 05 2018 *)
PROG
(PARI) isok(n) = (n>0) && issquare(n) && (sumdigits(n) == 4*#digits(n)); \\ Michel Marcus, Jul 05 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jon E. Schoenfield, Jul 04 2018
STATUS
approved