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.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Aug 27 2009

Keywords

Comments

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.

Crossrefs

Programs

  • 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 *)
  • PARI
    isok(n) = my(d=digits(n^2)); (vecsum(d) % #d) == 0; \\ Michel Marcus, Feb 24 2016