The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A301851 Table read by antidiagonals: T(n, k) gives the number of distinct distances on an n X k pegboard. 2

%I

%S 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 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 11,19,24,25,24,20,24,25,24,19,11,12,21,27,29,29,26,26,29,29,27,21,12

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

%C Main diagonal is A047800.

%H Peter Kagey, <a href="/A301851/b301851.txt">Table of n, a(n) for n = 1..10000</a>

%e 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 +---+---+---+---+---+---+

%e | * | | | | 16| 25|

%e +---+---+---+---+---+---+

%e | 1 | 2 | | | 17| 26|

%e +---+---+---+---+---+---+

%e | 4 | 5 | 8 | | 20| 29|

%e +---+---+---+---+---+---+

%e | 9 | 10| 13| 18| | 34|

%e +---+---+---+---+---+---+

%e (As depicted, the pegs are at the center of each face.)

%e Square array begins:

%e n\k| 1 2 3 4 5 6 7 8

%e ---+----------------------------------------

%e 1| 1 2 3 4 5 6 7 8

%e 2| 2 3 5 7 9 11 13 15

%e 3| 3 5 6 9 12 15 18 21

%e 4| 4 7 9 10 14 17 21 25

%e 5| 5 9 12 14 15 19 24 29

%e 6| 6 11 15 17 19 20 26 31

%e 7| 7 13 18 21 24 26 27 33

%e 8| 8 15 21 25 29 31 33 34

%o import Data.List (nub)

%o a301851 n k = length \$ nub [i^2 + j^2 | i <- [0..n-1], j <- [0..k-1]]

%Y Cf. A001481, A047800, A225273, A301853.

%K nonn,tabl

%O 1,2

%A _Peter Kagey_, Mar 27 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 7 23:50 EDT 2022. Contains 355995 sequences. (Running on oeis4.)