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.

A130684 Triangle read by rows: T(n,k) = number of squares (not necessarily orthogonal) all of whose vertices lie in an (n + 1) X (k + 1) square lattice.

This page as a plain text file.
%I A130684 #32 Apr 30 2025 23:14:15
%S A130684 1,2,6,3,10,20,4,14,30,50,5,18,40,70,105,6,22,50,90,140,196,7,26,60,
%T A130684 110,175,252,336,8,30,70,130,210,308,420,540,9,34,80,150,245,364,504,
%U A130684 660,825,10,38,90,170,280,420,588,780,990,1210,11,42,100,190,315,476,672
%N A130684 Triangle read by rows: T(n,k) = number of squares (not necessarily orthogonal) all of whose vertices lie in an (n + 1) X (k + 1) square lattice.
%C A130684 Reading down the diagonal gives A002415.
%H A130684 Joel B. Lewis, Jun 29 2007, <a href="/A130684/b130684.txt">Table of n, a(n) for n = 1..210</a>
%H A130684 Problem solved on the Art of Problem Solving forum, <a href="https://artofproblemsolving.com/community/c6h155463">Number of squares in a grid</a>
%F A130684 T(n, k) = k*(k+1)*(k+2)*(2*n - k + 1)/12 (k <= n).
%e A130684 T(2, 2) = 6 because there are 6 squares all of whose vertices lie in a 3 X 3 lattice: four squares of side length 1, one square of side length 2 and one non-orthogonal square of side length the square root of 2.
%e A130684 Triangle begins:
%e A130684   1;
%e A130684   2,   6;
%e A130684   3,  10,  20;
%e A130684   4,  14,  30,  50;
%e A130684   5,  18,  40,  70, 105;
%e A130684   6,  22,  50,  90, 140, 196;
%e A130684   7,  26,  60, 110, 175, 252, 336;
%e A130684   ...
%o A130684 (PARI) T(n, k) = binomial(k+2,3)*(2*n - k + 1)/2 \\ _Charles R Greathouse IV_, Mar 08 2017
%Y A130684 Cf. A002415. For squares whose edges are required to be parallel to the edges of the large square, see A082652.
%K A130684 easy,nonn,tabl
%O A130684 1,2
%A A130684 _Joel B. Lewis_, Jun 29 2007