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.

A164778 Numbers n with property that average digit of n^2 is s=6.

This page as a plain text file.
%I A164778 #11 Apr 11 2023 21:01:56
%S A164778 24,27,387,417,423,447,528,537,543,624,663,678,684,687,714,768,774,
%T A164778 786,813,816,822,828,834,864,867,876,882,888,891,894,924,927,933,936,
%U A164778 942,948,957,963,969,972,978,984,987,993,10386,11313,11772,12114,12186
%N A164778 Numbers n with property that average digit of n^2 is s=6.
%C A164778 All terms are multiples of 3.
%H A164778 Harvey P. Dale, <a href="/A164778/b164778.txt">Table of n, a(n) for n = 1..1000</a>
%e A164778 24^2 = 576 and (5 + 7 + 6)/3 = 6
%e A164778 387^2 = 149769 and (1 + 4 + 9 + 7 + 6 + 9)/6 = 6.
%t A164778 s={};me=6;Do[If[me==Mean[IntegerDigits[n^2]],Print[n];AppendTo[s,n]],{n,3,10^4,3}];s
%t A164778 Select[3*Range[5000],Mean[IntegerDigits[#^2]]==6&] (* _Harvey P. Dale_, Aug 17 2014 *)
%o A164778 (PARI) dsum(n)={my(s=0);while(n>9,s+=n%10;n\=10);s+n};
%o A164778 forstep(n=3,1e6,3,if(dsum(n^2)/#Str(n^2)==6,print1(n","))) \\ _Charles R Greathouse IV_, Nov 01 2009
%Y A164778 Subsequence of A164817.
%Y A164778 Average of digits of n^2 = s: A164771 (s=1), A164770 (s=2), A164782 (s=3), A164776 (s=4), A164774 (s=5), A164778 (s=6), A164773 (s=7), A164772 (s=8).
%K A164778 base,nonn
%O A164778 1,1
%A A164778 _Zak Seidov_, Aug 26 2009