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 A355551 #44 Oct 19 2024 18:07:02 %S A355551 1,2,8,23,61,144,322,689,1439,2954,6004,12123,24385,48932,98054, %T A355551 196325,392899,786078,1572472,3145295,6290981,12582392,25165258, %U A355551 50331033,100662631,201325874,402652412,805305539,1610611849,3221224524,6442449934 %N A355551 Number of ways to select 3 or more collinear points from a 3 X n grid. %H A355551 Thomas Garrison, <a href="/A355551/b355551.txt">Table of n, a(n) for n = 1...1000</a> %H A355551 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (4,-4,-2,5,-2). %F A355551 a(n) = 3*(2^n - 1 - n*(n+1)/2) + ceiling(n^2/2). %F A355551 a(n) = A000982(n) + 3*A002662(n). %F A355551 a(n) ~ 3*2^n. %F A355551 From _Stefano Spezia_, Jul 10 2022: (Start) %F A355551 G.f.: x*(1 - 2*x + 4*x^2 + x^3)/((1 - x)^3*(1 - x - 2*x^2)). %F A355551 a(n) = (3*2^(n+2) - 4*n^2 - 6*n - 11 - (-1)^n)/4. (End) %e A355551 a(5)=61: there are 3*(2^5 - 1 - binomial(6,2)) ways to select 3 or more points on a horizontal line, 5 ways on a vertical line, 3 ways on a diagonal line with slope 1, 3 ways on a diagonal line with slope -1, 1 way on a diagonal line with slope 1/2, and 1 way on a diagonal line with slope -1/2; 48 + 5 + 6 + 2 = 61. %t A355551 LinearRecurrence[{4, -4, -2, 5, -2}, {1, 2, 8, 23, 61}, 50] (* _Paolo Xausa_, Oct 19 2024 *) %o A355551 (Python) %o A355551 def a(n): return 3*((1<<n) - 1 - n*(n+1)//2)+(n**2+1)//2 %Y A355551 Cf. A002662 (1 X n), 2*A002662 (2 X n), A355552 (4 X n), A355553 (n X n). %K A355551 nonn,easy %O A355551 1,2 %A A355551 _Thomas Garrison_, Jul 06 2022