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.

A316480 Table read by rows: T(n,k), 0 <= k <= 9, is the number of n-digit squares whose average digit is exactly k.

This page as a plain text file.
%I A316480 #18 Jul 15 2018 12:34:12
%S A316480 1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,5,0,0,2,0,0,0,0,0,0,0,
%T A316480 6,0,0,0,0,0,0,0,5,0,0,21,0,0,1,0,0,0,0,57,0,0,42,0,0,0,0,2,0,0,192,0,
%U A316480 0,14,0,0,0,0,52,0,0,499,0,0,0,0,0,25,191,1281,2658,2282,705,65,0,0
%N A316480 Table read by rows: T(n,k), 0 <= k <= 9, is the number of n-digit squares whose average digit is exactly k.
%C A316480 The only square whose average digit is 0 is the 1-digit number 0^2 = 0.
%C A316480 The only square whose average digit is 9 is the 1-digit number 3^2 = 9.
%C A316480 Suppose m^2 is an n-digit number whose average digit is an integer k, i.e., digitsum(m^2) = n*k. Since digitsum(m^2) mod 9 = 0, 1, 4, or 7 (cf. A004159), it follows that
%C A316480 - if k = 1,   4, or 7, then n mod 9 = 0, 1, 4, or 7;
%C A316480 - if k = 2,   5, or 8, then n mod 9 = 0, 2, 5, or 8;
%C A316480 - if k = 3 or 6,       then n mod 9 = 0, 3, or 6.
%C A316480 In this table, each possible combination of a value of k and a value of n mod 9 is identified with an asterisk (*):
%C A316480 .
%C A316480                     n mod 9
%C A316480 .
%C A316480        0   1   2   3   4   5   6   7   8
%C A316480      +----------------------------------
%C A316480    1 | *   *           *           *
%C A316480      |
%C A316480    2 | *       *           *           *
%C A316480      |
%C A316480    3 | *           *           *
%C A316480      |
%C A316480    4 | *   *           *           *
%C A316480 k    |
%C A316480    5 | *       *           *           *
%C A316480      |
%C A316480    6 | *           *           *
%C A316480      |
%C A316480    7 | *   *           *           *
%C A316480      |
%C A316480    8 | *       *           *           *
%C A316480 .
%C A316480 Not surprisingly, among the values k=1..8, the value of k that occurs least frequently as the average digit of a square is 8.
%H A316480 Jon E. Schoenfield, <a href="/A316480/b316480.txt">Table of n, a(n) for n = 1..190</a>
%e A316480 Table begins
%e A316480   n\k| 0   1      2       3        4        5       6     7 8 9
%e A316480   ---+---------------------------------------------------------
%e A316480    1 | 1   1      0       0        1        0       0     0 0 1
%e A316480    2 | 0   0      0       0        0        1       0     0 0 0
%e A316480    3 | 0   0      0       5        0        0       2     0 0 0
%e A316480    4 | 0   0      0       0        6        0       0     0 0 0
%e A316480    5 | 0   0      5       0        0       21       0     0 1 0
%e A316480    6 | 0   0      0      57        0        0      42     0 0 0
%e A316480    7 | 0   2      0       0      192        0       0    14 0 0
%e A316480    8 | 0   0     52       0        0      499       0     0 0 0
%e A316480    9 | 0  25    191    1281     2658     2282     705    65 0 0
%e A316480   10 | 0  12      0       0     5308        0       0    93 0 0
%e A316480   11 | 0   0    548       0        0    13597       0     0 1 0
%e A316480   12 | 0   0      0   23310        0        0   12871     0 0 0
%e A316480   13 | 0  77      0       0   143724        0       0   753 0 0
%e A316480   14 | 0   0   5572       0        0   360720       0     0 1 0
%e A316480   15 | 0   0      0  449170        0        0  239403     0 0 0
%e A316480   16 | 0 102      0       0  3990950        0       0  6029 0 0
%e A316480   17 | 0   0  51977       0        0  9994767       0     0 4 0
%e A316480   18 | 0 417 157382 8665925 55115308 45351595 4568205 36552 8 0
%t A316480 Block[{nn = 9, s}, s = MapAt[Prepend[#, 0] &, Map[Mean@ IntegerDigits[#] &, SplitBy[Range[10^(nn/2)]^2, IntegerLength], {2}], 1]; Table[Count[s[[n]], k], {n, nn}, {k, 0, 9}]] // Flatten (* _Michael De Vlieger_, Jul 06 2018 *)
%Y A316480 Cf. A004159, A069711.
%Y A316480 Cf. A316481-A316488 (Squares whose arithmetic mean of digits is k, for k=1..8).
%K A316480 nonn,tabf,base
%O A316480 1,24
%A A316480 _Jon E. Schoenfield_, Jul 04 2018