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.

A164782 Numbers k with property that average digit of k^2 is 3.

Original entry on oeis.org

12, 15, 18, 21, 30, 330, 339, 345, 354, 360, 369, 375, 381, 399, 402, 405, 420, 429, 453, 459, 462, 465, 468, 471, 489, 492, 495, 498, 504, 540, 552, 555, 558, 561, 570, 579, 585, 639, 642, 645, 651, 660, 690, 708, 711, 720, 729, 735, 750, 780, 789, 795, 801
Offset: 1

Views

Author

Zak Seidov, Aug 26 2009

Keywords

Comments

All terms are multiples of 3.

Examples

			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.
		

Crossrefs

Subsequence of A164817.
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).

Programs

  • GAP
    Filtered([1..801],n->Sum(ListOfDigits(n^2))/Size(ListOfDigits(n^2))=3); # Muniru A Asiru, Nov 01 2018
  • 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 *)