I've been thinking about part 1 of Beyond Good and Evil recently, as I've been teaching it. I like to teach a bit of Nietzsche in intro, and I like to use a large block of text because I think context is important to understanding Nietzsche. In this particular case, I have now come to think that "On the Prejudices of Philosophers" has as a central goal advancing a certain doctrine of the a priori, one influenced by but in conflict with that of Kant.
Nietzsche of course rejects the a priori claims of traditional metaphysics, on the basis that they purport to represent a true world which is in reality utterly fanciful. Such is already firmly stated in the preface of BGE. He also speaks harshly of the synthetic a priori judgments of Kant, insisting forcefully that they are among the "falsest judgments" (5), but he at the same time claims that they are "indispensable," something he never claims about the judgments of dogmatic metaphysics.
What did he mean in saying they were false? Well, it's clear that they don't represent the true world; nothing does. There is no true world. Further, however, they do not represent experience. Nietzsche doesn't dispute Kant's claim that such judgments constitute part of what makes experience possible for us, but he denies (on my reading) that this means they really tell us anything about the world of experience (a point on which Kant says equivocal things; Nietzsche is clearly reading Kant as either being confused or mistaken when he speaks of the synthetic a priori claims as empirically true and necessary). Nietzsche is concerned to insist that the judgments are inventions of ours, interpretations imposed by us. He explicitly opens up the possibility of alternatives to Kantian logic in various places, questioning the causal interpretation of the world (22) and suggesting that the subject/object pattern of interpreting the world is a mistake (12, 17) and an artifact of language (20), but even if we had no alternatives, he would insist that Kant (and more so the Kantians) were nonetheless failing to "distinguish between 'invention' and 'discovery'" (11).
So logic and mathematics are inventions, not in any way given to us, either by a true world or by any kind of fanciful a priori intuitions (the "faculties" he mocks in section 11). An additional virtue of attributing such a view of the a priori to Nietzsche is that it may further help explain the surprisingly positive reference to Nietzsche in Carnap's "Overcoming Metaphysics through the Logical Analysis of Language," which even has a somewhat Nietzschean title. The view of logic and mathematics as human inventions accords well with Carnap's conventionalism, and the possibility of alternative interpretations and the focus on the usefulness of the interpretations for us both match up with Carnap's principle of tolerance and his emphasis on pragmatic considerations in language choice. If this was Carnap's own reading of Nietzsche, it becomes less surprising that Nietzsche earned his praise for "almost entirely avoiding" the confusion which Carnap saw as infecting metaphysics.