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.

A177723 Number of line segments connecting exactly 7 points in an n X n grid of points.

This page as a plain text file.
%I A177723 #4 Feb 16 2020 14:44:22
%S A177723 0,0,0,0,0,0,16,40,72,112,160,216,308,416,540,680,836,1008,1276,1576,
%T A177723 1908,2272,2668,3096,3660,4272,4932,5640,6396,7200,8308,9496,10764,
%U A177723 12112,13540,15048,16788,18624,20556,22584,24708,26928,29772,32760
%N A177723 Number of line segments connecting exactly 7 points in an n X n grid of points.
%C A177723 a(n) is also the number of pairs of points visible to each other exactly through 5 points in an n X n grid of points.
%H A177723 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>
%F A177723 See Mathematica code.
%t A177723 j=6;
%t A177723 a[n_]:=a[n]=If[n<=j,0,2*a1[n]-a[n-1]+R1[n]]
%t A177723 a1[n_]:=a1[n]=If[n<=j,0,2*a[n-1]-a1[n-1]+R2[n]]
%t A177723 R1[n_]:=R1[n]=If[n<=j,0,R1[n-1]+4*S[n]]
%t A177723 R2[n_]:=(n-1)*S[n]
%t A177723 S[n_]:=If[Mod[n-1,j]==0,EulerPhi[(n-1)/j],0]
%t A177723 Table[a[n],{n,1,50}]
%K A177723 nonn
%O A177723 1,7
%A A177723 _Seppo Mustonen_, May 13 2010