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 A177721 #6 Jul 22 2025 08:09:32 %S A177721 0,0,0,0,12,32,60,96,160,240,336,448,632,848,1096,1376,1760,2192,2672, %T A177721 3200,3952,4784,5696,6688,7864,9136,10504,11968,13888,15952,18160, %U A177721 20512,23280,26224,29344,32640,36568,40720,45096,49696,54856,60272,65944 %N A177721 Number of line segments connecting exactly 5 points in an n x n grid of points. %C A177721 a(n) is also the number of pairs of points visible to each other exactly through 3 points in an n x n grid of points. %H A177721 S. Mustonen, <a href="http://www.survo.fi/papers/LinesInGrid2.pdf">On lines going through a given number of points in a rectangular grid of points</a> %H A177721 Seppo Mustonen, <a href="/A141255/a141255.pdf">On lines going through a given number of points in a rectangular grid of points</a> [Local copy] %F A177721 See Mathematica code. %t A177721 j=4; %t A177721 a[n_]:=a[n]=If[n<=j,0,2*a1[n]-a[n-1]+R1[n]] %t A177721 a1[n_]:=a1[n]=If[n<=j,0,2*a[n-1]-a1[n-1]+R2[n]] %t A177721 R1[n_]:=R1[n]=If[n<=j,0,R1[n-1]+4*S[n]] %t A177721 R2[n_]:=(n-1)*S[n] %t A177721 S[n_]:=If[Mod[n-1,j]==0,EulerPhi[(n-1)/j],0] %t A177721 Table[a[n],{n,1,50}] %K A177721 nonn %O A177721 1,5 %A A177721 _Seppo Mustonen_, May 13 2010