Problem: A line in the plane is called \emph{sunny}
if it is not parallel to any of the $x$–axis, the $y$–axis, or the line $x+y=0$.

Let $n \ge 3$ be a given integer.
Determine all nonnegative integers $k$ such that there exist $n$ distinct lines
in the plane satisfying both of the following:
\begin{itemize}
\ii for all positive integers $a$ and $b$ with $a+b\le n+1$,
  the point $(a,b)$ lies on at least one of the lines; and
\ii exactly $k$ of the $n$ lines are sunny.
\end{itemize}

Solution: The answer is $0$, $1$, or $3$ sunny lines.

In what follows, we draw the grid as equilateral instead of a right triangle;
this has no effect on the problem statement but is more symmetric.

We say a \emph{long line} is one of the three lines at the edge of the grid,
i.e.\ one of the (non-sunny) lines passing through $n$ points.
The main claim is the following.
\begin{claim*}
  If $n \ge 4$, any set of $n$ lines must have at least one long line.
\end{claim*}
\begin{proof}
  Consider the $3(n-1)$ points on the outer edge of the grid.
  If there was no long line, each of the $n$ lines passes through at most two such points.
  So we obtain $2n \ge 3(n-1)$, which forces $n \le 3$.
\end{proof}

Hence, by induction we may repeatedly delete a long line without changing the number
of sunny lines until $n = 3$ (and vice-versa: given a construction for smaller $n$
we can increase $n$ by one and add a long line).

We now classify \emph{all} the ways to cover
the $1+2+3=6$ points in an $n=3$ grid with $3$ lines.
\begin{center}
\begin{asy}
  dotfactor *= 2;
  unitsize(2cm);
  pair A = dir(90);
  pair B = dir(210);
  pair C = dir(330);
  pair X = midpoint(B--C);
  pair Y = midpoint(C--A);
  pair Z = midpoint(A--B);
  picture tri;
  dot(tri, A);
  dot(tri, B);
  dot(tri, C);
  dot(tri, X);
  dot(tri, Y);
  dot(tri, Z);
  picture left_case;
  picture right_case;
  add(left_case, tri);
  add(right_case, tri);

  draw(left_case, (1.2*A-0.2*B)--(1.2*B-0.2*A), red, Arrows);
  draw(left_case, circle((C+X+Y)/3, 0.75), blue);
  label(left_case, "Long line present", 1.2*dir(-90));

  draw(right_case, (1.3*A-0.3*X)--(1.3*X-0.3*A), deepgreen, Arrows);
  draw(right_case, (1.3*B-0.3*Y)--(1.3*Y-0.3*B), deepgreen, Arrows);
  draw(right_case, (1.3*C-0.3*Z)--(1.3*Z-0.3*C), deepgreen, Arrows);

  label(right_case, "No long line", 1.2*dir(-90));

  add(left_case);
  add(shift(3,0)*right_case);
\end{asy}
\end{center}

\begin{itemize}
  \ii If there is a long line (say, the red one in the figure),
  the remaining $1+2=3$ points (circled in blue) are covered with two lines.
  One of the lines passes through $2$ points and must not be sunny;
  the other line may or may not be sunny.
  Hence in this case the possible counts of sunny lines are $0$ or $1$.

  \ii If there is no long line, each of the three lines passes through at most $2$ points.
  But there are $6$ total lines, so in fact each line must pass through
  \emph{exactly} two points.
  The only way to do this is depicted in the figure in the right.
  In this case there are $3$ sunny lines.
\end{itemize}

This proves that $0$, $1$, $3$ are the only possible answers.

\begin{remark*}
  The concept of a sunny line is not that important to the problem.
  The proof above essentially classifies all the ways to cover
  the $1+2+\dots+n$ points with exactly $n$ lines.
  Namely, one should repeatedly take a long line and decrease $n$ until $n=3$,
  and then pick one of the finitely many cases for $n=3$.
  The count of sunny lines just happens to be whatever is possible for $n=3$,
  since long lines are not sunny.
\end{remark*}