Here is solution to #1. We want

that means

. But then

. And the system of equations

always has a solution provided

.
So we need to count the number of ways we can get

for all pairs

. Note if

. Then the maximum value

is

which is always true for

. We we just need to count all pairs

where

.
If

then there is no

in the pair

so that

. So the count is 0.
If

then there is just

in the pair

so that

. So the count is 1.
If

then there is just

in the pair

so that

. So the count is 2.
If

then we can pick

. So the count is 4.
If

then we can pick

. So the count is 6.
The question is whether we can find a pattern. Yes! It is based on looking at even and odd cases. Say

is even so

then

in that case

. So the count is

.
If

is odd, so,

then

. Which means

. So the count is

.
Now if we write out the numbers as we did for

out further we will get:

Where (alternatively)

And (again alternatively)

.
This list continous until

on

the value of

. And for

is will be

.
If we split this sum into even terms in the sequence and odd terms in the sequence we get:

.
But this is for

(I just realized it should have been

but I am too lazy to change it now. You get the idea).
Now just find the number of pairs

for

which is just

and add to the answer.