cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A164817 Positive numbers n with property that average digit of n^2 is an integer.

This page as a plain text file.
%I A164817 #18 Jan 09 2025 02:13:39
%S A164817 1,2,3,8,12,15,18,21,24,27,30,41,58,59,68,85,95,113,122,145,152,157,
%T A164817 158,166,176,179,184,190,193,194,212,221,238,251,256,257,266,274,275,
%U A164817 283,284,292,311,313,330,339,345,354,360,369,375,381,387,399,402,405,417
%N A164817 Positive numbers n with property that average digit of n^2 is an integer.
%C A164817 A004159(n)/nod(n^2) = sod(n^2)/nod(n^2) is an 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.
%H A164817 Robert Israel, <a href="/A164817/b164817.txt">Table of n, a(n) for n = 1..10000</a>
%p A164817 filter:= proc(n) local L;
%p A164817 L:= convert(n^2,base,10);
%p A164817 type(convert(L,`+`)/nops(L), integer)
%p A164817 end proc:
%p A164817 select(filter, [$1..1000]); # _Robert Israel_, Feb 24 2016
%t A164817 Select[Range[500],IntegerQ[Mean[IntegerDigits[#^2]]]&] (* _Harvey P. Dale_, May 25 2011 *)
%o A164817 (PARI) isok(n) = my(d=digits(n^2)); (vecsum(d) % #d) == 0; \\ _Michel Marcus_, Feb 24 2016
%Y A164817 Cf. A004159, A164818.
%K A164817 base,nonn
%O A164817 1,2
%A A164817 _Zak Seidov_, Aug 27 2009