OFFSET
1,1
COMMENTS
All terms are multiples of 3.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 12 because 12^2 = 144 and (1 + 4 + 4)/3 = 3.
a(53) = 801 because 801^2 = 641601 and (6 + 4 + 1 + 6 + 0 + 1)/6 = 3.
MAPLE
filter:= proc(n) local L;
L:= convert(n^2, base, 10);
convert(L, `+`)=3*nops(L)
end proc:
select(filter, [seq(i, i=3..1000, 3)]); # Robert Israel, Nov 01 2018
MATHEMATICA
s={}; Do[If[3==Mean[IntegerDigits[n^2]], Print[n]; AppendTo[s, n]], {n, 3, 1000, 3}]; s
Select[Range[1000], Mean[IntegerDigits[#^2]]==3&] (* Harvey P. Dale, Jan 13 2015 *)
PROG
(GAP) Filtered([1..801], n->Sum(ListOfDigits(n^2))/Size(ListOfDigits(n^2))=3); # Muniru A Asiru, Nov 01 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Aug 26 2009
STATUS
approved