Here, eines is called the indefinite pronoun.
You could write Willst du [ein Buch] [dieser Bücher]? ("Do you want [one book] [of these books]?") but that sounds just as repetitive in German as it does in English. We would rather say "Do you want one of these books?". By the way, in each of these sentences, the first part in brackets is in accusative, and the second in genitive. Eines is not genitive here! Confused? Keep reading :)
So how do you say "one" in German? Some kind of ein- word for sure... but things usually need to be declined when they're referring to nouns - even when you leave the noun out! So you can think of this in two ways. Pick whichever one makes sense to you:
Memorise the indefinite pronoun table. Notice that because we are leaving out the noun (to avoid saying Buch twice), we must therefore need a pronoun. So look up the table for the indefinite pronoun that you need for a neuter object in accusative case: eines
You already know how ein- normally changes its ending. Tell yourself that 'when the noun isn't there, the ending needs to be even stronger to avoid ambiguity'. So instead of the 'endingless' form for neuter objects in accusative case (ein Buch), it gets higher responsibility than usual and gets the 'strong' ending normally reserved for der/die/das. That means it becomes: eines
I'm also confused. Looking up the declension tables for genitive plural, I see that we need dieser. But then also einer? The tables suggest that eines is for singular neuter or masculine. So what's singular? The book? Then is einer singular or plural? Still hoping for that lightbulb moment...
das Buch is neuter, so in accusative it remains as das and associated -s endings, which gives you eines [Buch]. The genitive part is at the end, where the genitive plural takes the -r endings: dieser Bücher.
[EDIT: In normal accusative, it would be "ein Buch (of these books)". But since we don't want to say "book" twice, we say "one (of these books)". In this situation, without the noun present anymore, we need to decline ein even more strongly than usual, so it becomes eines. In this sentence, eines is accusative. The genitive part is "of these books", i.e. dieser Bücher.]
That can't be right... there is no way an "ein" word can have an "es" at the end in the accusative. Only der words and strong adjectives can have an "es" at the end in accusative. (i.e. dieses Buch OR ein Buch OR ein rotes Buch all accusative) Both eines and dieser are in the genitive case here.
Nope. This was the source of my confusion too, because I was looking at tables like this. However, that's not the whole story (annoyingly!).
Here, eines is actually functioning a bit differently to normal. We know ein- as the indefinite article. And that's what the table I linked to shows: all the variations of the indefinite article. But! To be an article, it needs to be followed by a noun... and it isn't. As I explained in another comment, saying eines is actually replacing saying ein Buch to avoid repetition - that is, eines is standing in for a noun... and what do we call things that stand in for nouns? Pronouns. So here, eines is not an article, but the indefinite pronoun. This is why it's not on the table of indefinite articles. But it's on the table of indefinite pronouns (which should probably be added to Wikipedia).
(I didn't know that terminology before looking this up, which made it hard to find! I find it easier to think of ein- 'declining more strongly' when the noun is absent, as I mentioned before.)
Buch is neuter (i.e. das Buch), so the normal indefinite article in accusative is ein, becoming eines when you drop the noun as I explained in my other comment. Eines is not genitive here.
Hut is masculine (i.e. der Hut), so the normal indefinite article in accusative is einen. This is already the 'strongest' declension it can get, so when you drop the noun you don't have to change anything (and keinen works exactly the same).