A090021 Number of distinct lines through the origin in the n-dimensional lattice of side length 5.
0, 1, 21, 175, 1185, 7471, 45801, 277495, 1672545, 10056991, 60405081, 362615815, 2176242705, 13059083311, 78359348361, 470170570135, 2821066729665, 16926530042431, 101559568723641, 609358576700455, 3656154951181425
Offset: 0
Examples
a(2) = 21 because in 2D the lines have slope 0, 1/5, 2/5, 3/5, 4/5, 1/4, 3/4, 1/3, 2/3, 1/2, 1 and their reciprocals.
Links
- Index entries for linear recurrences with constant coefficients, signature (12,-47,72,-36).
Crossrefs
Programs
-
Mathematica
Table[6^n - 3^n - 2*2^n + 2, {n, 0, 25}] LinearRecurrence[{12,-47,72,-36},{0,1,21,175},30] (* Harvey P. Dale, Jul 18 2016 *)
Formula
a(n) = 6^n - 3^n - 2*2^n + 2.
G.f.: -x*(30*x^2-9*x-1)/((x-1)*(2*x-1)*(3*x-1)*(6*x-1)). [Colin Barker, Sep 04 2012]
Comments