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.

A301851 Table read by antidiagonals: T(n, k) gives the number of distinct distances on an n X k pegboard.

This page as a plain text file.
%I A301851 #22 Oct 29 2021 06:05:18
%S A301851 1,2,2,3,3,3,4,5,5,4,5,7,6,7,5,6,9,9,9,9,6,7,11,12,10,12,11,7,8,13,15,
%T A301851 14,14,15,13,8,9,15,18,17,15,17,18,15,9,10,17,21,21,19,19,21,21,17,10,
%U A301851 11,19,24,25,24,20,24,25,24,19,11,12,21,27,29,29,26,26,29,29,27,21,12
%N A301851 Table read by antidiagonals: T(n, k) gives the number of distinct distances on an n X k pegboard.
%C A301851 Main diagonal is A047800.
%H A301851 Peter Kagey, <a href="/A301851/b301851.txt">Table of n, a(n) for n = 1..10000</a>
%e A301851 The 4 X 6 pegboard has 17 distinct distances: 0, 1, sqrt(2), 2, sqrt(5), sqrt(8), 3, sqrt(10), sqrt(13), 4, sqrt(17), sqrt(18), sqrt(20), 5, sqrt(26), sqrt(29), and sqrt(34).
%e A301851 +---+---+---+---+---+---+
%e A301851 | * |   |   |   | 16| 25|
%e A301851 +---+---+---+---+---+---+
%e A301851 | 1 | 2 |   |   | 17| 26|
%e A301851 +---+---+---+---+---+---+
%e A301851 | 4 | 5 | 8 |   | 20| 29|
%e A301851 +---+---+---+---+---+---+
%e A301851 | 9 | 10| 13| 18|   | 34|
%e A301851 +---+---+---+---+---+---+
%e A301851 (As depicted, the pegs are at the center of each face.)
%e A301851 Square array begins:
%e A301851   n\k|    1    2    3    4    5    6    7    8
%e A301851   ---+----------------------------------------
%e A301851     1|    1    2    3    4    5    6    7    8
%e A301851     2|    2    3    5    7    9   11   13   15
%e A301851     3|    3    5    6    9   12   15   18   21
%e A301851     4|    4    7    9   10   14   17   21   25
%e A301851     5|    5    9   12   14   15   19   24   29
%e A301851     6|    6   11   15   17   19   20   26   31
%e A301851     7|    7   13   18   21   24   26   27   33
%e A301851     8|    8   15   21   25   29   31   33   34
%o A301851 (Haskell)
%o A301851 import Data.List (nub)
%o A301851 a301851 n k = length $ nub [i^2 + j^2 | i <- [0..n-1], j <- [0..k-1]]
%Y A301851 Cf. A001481, A047800, A225273, A301853.
%K A301851 nonn,tabl
%O A301851 1,2
%A A301851 _Peter Kagey_, Mar 27 2018