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 A160844 #24 Feb 05 2025 00:36:16 %S A160844 0,1,18,35,62,93,136,181,238,299,370,445,532,621,722,827,942,1061, %T A160844 1192,1325,1470,1619,1778,1941,2116,2293,2482,2675,2878,3085,3304, %U A160844 3525,3758,3995,4242,4493,4756,5021,5298,5579,5870,6165,6472,6781,7102,7427,7762 %N A160844 Number of lines through at least 2 points of a 4 X n grid of points. %H A160844 Seiichi Manyama, <a href="/A160844/b160844.txt">Table of n, a(n) for n = 0..1000</a> %H A160844 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 A160844 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,0,-1,-1,1). %F A160844 a(n) = 2*a(n-1) - a(n-2) + C(mod(n+2,6) + 1), C=(10,4,12,2,12,4), for n >= 4. %F A160844 From _Colin Barker_, May 24 2015: (Start) %F A160844 a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n > 5. %F A160844 G.f.: x*(4*x^6 - 3*x^4 + 9*x^3 + 16*x^2 + 17*x + 1) / ((1-x)^3*(x + 1)*(x^2 + x + 1)). %F A160844 (End) %t A160844 a[0]=0; a[1]=1; a[2]=18; a[3]=35; a[n_]:=a[n]=a[n]=2*a[n-1]-a[n-2]+R[n] c4={10,4,12,2,12,4}; R[n_]:=c4[[Mod[n+2,6]+1]] Table[a[n],{n,0,46}] %t A160844 Join[{0,1}, LinearRecurrence[{1,1,0,-1,-1,1}, {18, 35, 62, 93, 136, 181}, 50]] (* _G. C. Greubel_, Apr 30 2018 *) %o A160844 (Magma) I:=[18, 35, 62, 93, 136, 181]; [0,1] cat [n le 6 select I[n] else Self(n-1) +Self(n-2) -Self(n-4) -Self(n-5) +Self(n-6): n in [1..30]]; // _G. C. Greubel_, Apr 30 2018 %o A160844 (PARI) my(x='x+O('x^30)); concat([0], Vec(x*(4*x^6-3*x^4+9*x^3+16*x^2+ 17*x+1 )/((1-x)^3*(x+1)*(x^2+x+1)))) \\ _G. C. Greubel_, Apr 30 2018 %Y A160844 4th row/column of A107348, A295707. %K A160844 nonn %O A160844 0,3 %A A160844 _Seppo Mustonen_, May 28 2009