OFFSET
1,1
COMMENTS
All terms are multiples of 3.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
24^2 = 576 and (5 + 7 + 6)/3 = 6
387^2 = 149769 and (1 + 4 + 9 + 7 + 6 + 9)/6 = 6.
MATHEMATICA
s={}; me=6; Do[If[me==Mean[IntegerDigits[n^2]], Print[n]; AppendTo[s, n]], {n, 3, 10^4, 3}]; s
Select[3*Range[5000], Mean[IntegerDigits[#^2]]==6&] (* Harvey P. Dale, Aug 17 2014 *)
PROG
(PARI) dsum(n)={my(s=0); while(n>9, s+=n%10; n\=10); s+n};
forstep(n=3, 1e6, 3, if(dsum(n^2)/#Str(n^2)==6, print1(n", "))) \\ Charles R Greathouse IV, Nov 01 2009
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Aug 26 2009
STATUS
approved