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.
%I A248333 #17 Mar 21 2021 12:55:58 %S A248333 0,0,0,0,1,1,2,2,3,4,4,5,6,6,7,8,9,9,10,11,12,12,13,14,15,16,16,17,18, %T A248333 19,20,20,21,22,23,24,25,25,26,27,28,29,30,30,31,32,33,34,35,36,36,37, %U A248333 38,39,40,41,42,42,43,44,45,46,47,48,49,49,50,51,52,53,54,55,56,56,57,58,59 %N A248333 Number of unit squares enclosed by n lattice points in and along the first quadrant of the coordinate plane starting from (0,0) and moving along each square gnomon starting on the y-axis and ending on the x-axis. %C A248333 For n > 0, the pattern fails to add a square if n is of the form k^2+1 (A002522) or k^2-k+1 (A002061). Taken together, these numbers are: 1, 2, 3, 5, 7, 10, 13, 17, ... All other numbers add one unit square to the pattern (see example). %e A248333 Figure 1: . %e A248333 . . . . . . . . . . . . . . . %e A248333 . . . . . . . . . . . . . . . . . . . . %e A248333 . . . . . . . . . . . . . . . . . . . %e A248333 ------------------------------------------------------------------- %e A248333 n: 0 1 2 3 4 5 6 7 8 9 10 %e A248333 a(n): 0 0 0 0 1 1 2 2 3 4 4 %e A248333 -- . %e A248333 . . . . . . . . . . . . . . . . . . . . . . . . . %e A248333 . . . . . . . . . . . . . . . . . . . . . . . . . %e A248333 . . . . . . . . . . . . . . . . . . . . . . . . %e A248333 . . . . . . . . . . . . . . . . . . . . . . . %e A248333 ------------------------------------------------------------------- %e A248333 n: 11 12 13 14 15 16 17 %e A248333 a(n): 5 6 6 7 8 9 9 %e A248333 -- %e A248333 n = 4 -->(0,0), (0,1), (1,1), (1,0) enclose one unit square. %e A248333 n = 5 -->(0,0), (0,1), (1,1), (1,0), (0,2) also enclose one unit square. %e A248333 n = 6 -->(0,0), (0,1), (1,1), (1,0), (0,2), (1,2) enclose two unit squares. %p A248333 A248333:=n->add(`if`(issqr(i-1) or issqr(floor(i-sqrt(i-1))),0,1),i=1..n): seq(A248333(n), n=0..100); %o A248333 (PARI) a(n) = sum(i=1, n, !(issquare(i-1) || issquare(floor(i-sqrt(i-1))))); \\ _Michel Marcus_, Mar 21 2021 %Y A248333 Cf. A002061 (n^2-n+1), A002522 (n^2+1). %K A248333 nonn %O A248333 0,7 %A A248333 _Wesley Ivan Hurt_, Oct 04 2014