A090020 Number of distinct lines through the origin in the n-dimensional lattice of side length 4.
0, 1, 13, 91, 529, 2851, 14833, 75811, 383809, 1932931, 9705553, 48648931, 243605089, 1219100611, 6098716273, 30503196451, 152544778369, 762810181891, 3814309582993, 19072323542371, 95363943807649, 476826695752771
Offset: 0
Examples
a(2) = 13 because in 2D the lines have slope 0, 1/4, 1/3, 1/2, 2/3, 3/4, 1, 4/3, 3/2, 2, 3, 4 and infinity.
Links
- Indranil Ghosh, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (11,-41,61,-30).
Crossrefs
Programs
-
Mathematica
Table[5^n - 3^n - 2^n + 1, {n, 0, 25}] LinearRecurrence[{11,-41,61,-30},{0,1,13,91},30] (* Indranil Ghosh, Feb 21 2017 *)
-
Python
def A090020(n): return 5**n-3**n-2**n+1 # Indranil Ghosh, Feb 21 2017
Formula
a(n) = 5^n - 3^n - 2^n + 1.
G.f.: -x*(11*x^2-2*x-1)/((x-1)*(2*x-1)*(3*x-1)*(5*x-1)). [Colin Barker, Sep 04 2012]
Comments