|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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:
|
|
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
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|