OFFSET
0,3
COMMENTS
Equivalently, lattice points where the gcd of all the coordinates is 1.
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).
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]
EXAMPLE
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.
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 *)
PROG
(Python) def A090020(n): return 5**n-3**n-2**n+1 # Indranil Ghosh, Feb 21 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joshua Zucker, Nov 19 2003
STATUS
approved