A143166 Wolfdieter Lang (rewritten after loss of the old link, Aug 15 2019) The discrete 2n-frame, for n >=1, with the origin (0,0) as center consists of the sites (vertices) of a square of side length 2*n with the 8*n coordinates (p,q), with |p| <= n, |q| <= n, and at least one coordinate is +n or -n. For n = 0 only the origin (0,0) is considered. n = 0: Exception: only one site with coordinate (0,0) and value 0^2 + 0^2 = 0 = 4*a(0). n = 1: The 8 coordinates of the sites of the square are (from top to bottom) (-1,1), (0, 1), (1, 1); (-1,0), (1,0); (-1,-1), (0,-1), (1,-1). The sum of the corresponding p^2 + q^2 values is 4*(2 + 1) = 4*3 = 4*a(1). n = 2: The 16 coordinates of the sites of the square are (-2,2), (-1,2), (0,2), (1,2), (2,2); (-2,1), (2,1); (-2,0), (2,0); (-2,-1), (2,-1); (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2). The sum of the corresponding p^2 + q^2 values is 4*(8 + 2*5 + 4) = 4*22 = 4*a(2). n = 3: only one side of the square is needed, e.g., the top side, with 7 coordinates (-3,3), (-2,3), (-1,3), (0,3), (1,3), (2,3), (3,3), with p^2 +q^2 values 18, 13, 10, 9, 10, 13, 18, leading to the total sum for the 6-frame: 4*(18 + 2*(13 + 10) + 9) = 4*73 = 4*a(3). n = 4: the top side has the 9 coordinates (-4,4), (-3,4), (-2,4), (-1,4), (0,4), (1,4), (2,4), (3,4), (4,4), with the p^2 +q^2 values 32, 25, 20, 17, 16, 17, 20, 25, 32, leading to the total sum for the 8-frame: 4*(32 + 2*(25 + 20 + 17) + 16) = 4*172 = 4*a(4). ... -------------------------------------------------------------------------------- For the triangle T(n, k) = n^2 +k^2, n >=1, k = 1..n, see A069011: [0], [1 2], [4 5 8], [9 10 13 18], [16 17 20 25 32], [25, 26, 29, 34, 41, 50], ... Therefore, a(n) = T(n, 0) + 2*Sum_{k=1..n-1}T(n,k) + T(n,k). E.g., n=5: 25 + 2*(26 + 29 + 34 + 41) + 50 = 335 = a(5). ---------------------------------- e.o.f. --------------------------------------