login
A164817
Positive numbers n with property that average digit of n^2 is integer.
10
1, 2, 3, 8, 12, 15, 18, 21, 24, 27, 30, 41, 58, 59, 68, 85, 95, 113, 122, 145, 152, 157, 158, 166, 176, 179, 184, 190, 193, 194, 212, 221, 238, 251, 256, 257, 266, 274, 275, 283, 284, 292, 311, 313, 330, 339, 345, 354, 360, 369, 375, 381, 387, 399, 402, 405, 417
OFFSET
1,2
COMMENTS
A004159(n)/nod(n^2) = sod(n^2)/nod(n^2) is integer, where sod(n^2)= sum of digits of n^2, nod(n^2) = number of digits of n^2. Correspondent values of sod(n^2)/nod(n^2) in A164818.
LINKS
MAPLE
filter:= proc(n) local L;
L:= convert(n^2, base, 10);
type(convert(L, `+`)/nops(L), integer)
end proc:
select(filter, [$1..1000]); # Robert Israel, Feb 24 2016
MATHEMATICA
Select[Range[500], IntegerQ[Mean[IntegerDigits[#^2]]]&] (* Harvey P. Dale, May 25 2011 *)
PROG
(PARI) isok(n) = my(d=digits(n^2)); (vecsum(d) % #d) == 0; \\ Michel Marcus, Feb 24 2016
CROSSREFS
Sequence in context: A368357 A192113 A243192 * A002958 A290153 A266629
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Aug 27 2009
STATUS
approved