The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A160842 Number of lines through at least 2 points of a 2 X n grid of points. 4
 0, 1, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027, 2118, 2211, 2306, 2403, 2502 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Vincenzo Librandi, Table of n, a(n) for n = 0..10000 Seppo Mustonen, On lines and their intersection points in a rectangular grid of points [Local copy] Index entries for linear recurrences with constant coefficients, signature (3,-3,1). FORMULA a(n) = n^2 + 2 = A059100(n) for n > 1. a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. - Colin Barker, May 24 2015 G.f.: -x*(2*x^3 - 4*x^2 + 3*x + 1) / (x-1)^3. - Colin Barker, May 24 2015 Sum_{n>=1} 1/a(n) = Pi * coth(sqrt(2)*Pi) / 2^(3/2) - 1/4. - Vaclav Kotesovec, May 01 2018 MATHEMATICA a[n_]:=If[n<2, n, n^2+2] Table[a[n], {n, 0, 50}] Join[{0, 1}, Range[2, 50]^2+2] (* Harvey P. Dale, Feb 06 2015 *) PROG (PARI) Vec(-x*(2*x^3-4*x^2+3*x+1) / (x-1)^3 + O(x^100)) \\ Colin Barker, May 24 2015 (MAGMA) [0, 1] cat [n^2 + 2: n in [2..100]]; // G. C. Greubel, Apr 30 2018 CROSSREFS Cf. A295707, A107348. Sequence in context: A073945 A083500 A102305 * A007745 A188556 A021011 Adjacent sequences:  A160839 A160840 A160841 * A160843 A160844 A160845 KEYWORD nonn,easy AUTHOR Seppo Mustonen, May 28 2009 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 9 13:42 EDT 2021. Contains 343742 sequences. (Running on oeis4.)