1. Some students aren't good at math.

2. Any students aren't good at math.
3. No students are good at math.
4. A few students aren't good at math.
[Which one is ungrammatical? Do you use #1 more than #4? Which one is commonly used?]

5. I don't have any books.
6. I don't have some books.
7. I have no books.
[#5 means #7. What about #6? Do you use #6?]

#2 is not good grammar in that it doesn't make sense. "Any students"? #1 and #4 mean the same thing, and either can be used. #3 is simply not true, so no one would say it.

#6 means you have some books but not others.

1. Some students aren't good at math. - This sentence is grammatically correct and commonly used. It implies that there are students who are not good at math, but it does not specify the exact number or quantity.

2. Any students aren't good at math. - This sentence is ungrammatical because it lacks a determiner before "students." It would need to be rewritten as "Not any students are good at math" or "No students are good at math" to be grammatically correct.

3. No students are good at math. - This sentence is grammatically correct and commonly used. It means that there are no students who are good at math.

4. A few students aren't good at math. - This sentence is grammatically correct and commonly used. It suggests that there is a small number or proportion of students who are not good at math.

Regarding usage, both #1 and #4 are commonly used, but their meanings are slightly different. #1 (Some students aren't good at math) implies that there is a subset of students who are not good at math, while #4 (A few students aren't good at math) suggests that only a small number of students are not good at math.

Now, moving on to your second set of sentences:

5. I don't have any books. - This sentence is grammatically correct and commonly used. It indicates that the speaker does not possess any books.

6. I don't have some books. - This sentence is grammatically correct but less commonly used. It implies that there are specific books that the speaker does not possess, and it is often used to contrast with books that the speaker does have. For clarity and better understanding, it is more common to use sentence #7 instead.

7. I have no books. - This sentence is grammatically correct and commonly used. It means that the speaker does not have any books at all.

In summary, #5 and #7 are both commonly used and have the same meaning, while #6 is less commonly used and has a slightly different meaning, focusing on specific books that the speaker does not possess.