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.

A160843 Number of lines through at least 2 points of a 3 X n grid of points.

This page as a plain text file.
%I A160843 #27 Jun 25 2025 14:31:10
%S A160843 0,1,11,20,35,52,75,100,131,164,203,244,291,340,395,452,515,580,651,
%T A160843 724,803,884,971,1060,1155,1252,1355,1460,1571,1684,1803,1924,2051,
%U A160843 2180,2315,2452,2595,2740,2891,3044,3203,3364,3531,3700,3875,4052,4235,4420
%N A160843 Number of lines through at least 2 points of a 3 X n grid of points.
%H A160843 Vincenzo Librandi, <a href="/A160843/b160843.txt">Table of n, a(n) for n = 0..10000</a>
%H A160843 S. Mustonen, <a href="http://www.survo.fi/papers/PointsInGrid.pdf">On lines and their intersection points in a rectangular grid of points</a>
%H A160843 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F A160843 a(n) = 2*n^2 + 3 - n mod 2.
%F A160843 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n > 5. - _Colin Barker_, May 24 2015
%F A160843 G.f.: -x*(3*x^4 - 3*x^3 - 2*x^2 + 9*x + 1) / ((x-1)^3*(x+1)). - _Colin Barker_, May 24 2015
%t A160843 a[n_]:=If[n<2,n,2*n^2+3-Mod[n,2]] Table[a[n],{n,0,47}]
%t A160843 Join[{0, 1}, LinearRecurrence[{2, 0, -2, 1}, {11, 20, 35, 52}, 20]] (* _G. C. Greubel_, Apr 30 2018 *)
%o A160843 (PARI) Vec(-x*(3*x^4-3*x^3-2*x^2+9*x+1)/((x-1)^3*(x+1)) + O(x^100)) \\ _Colin Barker_, May 24 2015
%o A160843 (Magma) [0, 1] cat [2*n^2 + 3 - n mod 2: n in [2..100]]; // _G. C. Greubel_, Apr 30 2018
%Y A160843 3rd row/column of A107348, A295707.
%K A160843 nonn,easy
%O A160843 0,3
%A A160843 _Seppo Mustonen_, May 28 2009