OFFSET
3,1
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 3..10000
FORMULA
a(n) = 3*Sum_{j=1..floor((n-1)/(k-1))} EulerPhi(j) * (g(n-(k-1)*j) - g(n-k*j)) where k = 3 (the minimum required number of points) and g(i) = A000217(i) (i.e., the i-th triangular number) if i > 0, otherwise 0. - Jon E. Schoenfield, Aug 17 2014
EXAMPLE
a
b c
d e f
g h i j
In this triangle grid of side 4, there are a(4) = 6 distinct lines passing through at least 3 points: ag, gj, ja, ch, df, ib.
PROG
(PARI) g(n) = if (n>0, n*(n+1)/2, 0);
a(n) = my(k=3); 3*sum(j=1, (n-1)\(k-1), eulerphi(j) * (g(n-(k-1)*j) - g(n-k*j))); \\ Michel Marcus, Aug 19 2014
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Heinrich Ludwig, Jan 18 2014
EXTENSIONS
More terms from Jon E. Schoenfield, Aug 17 2014
STATUS
approved