Derivation of Surplus in Paul Romer's paper on "mathiness" In this paper by P. Romer https://pubs.aeaweb.org/doi/pdfplus/10.1257/aer.p20151066
I'm wondering the Surplus $S$ was derived.
By using the given condition I found that $$q_0=m^{-\tfrac{1}{a+b}}N^{-\tfrac{b}{a+b}}$$
By Surplus I assume he means total Surplus (Consumer Surplus + Producer Surplus) which can be calculated by the integral $$\displaystyle{S=\int_{0}^{q_0}[D(q)-S(q)]dq=\int_{0}^{q_0}[q^{-a}-N^{b}q^{b}]dq}$$
With a little bit of algebra I find $$S=C(a,b,m)N^{\tfrac{b(a-1)}{a+b}}$$ where $C(a,b,m)=\tfrac{1}{1-a}m^{\tfrac{a-1}{a+b}}-\tfrac{1}{b+1}m^{-\tfrac{b+1}{a+b}}$
So I'm probably wrong, is my idea of $S$ correct? I need to know because if it is then it's likely a mistake in my algebra. I also assumed that $b&gt;0$ and $0\leq a&lt;1$
I think you have a typo in your  $q_0$: the exponent of $N$ should be  $-\frac{b}{a+b}$. I did the whole calculus with this corrected type of $q_0$ and I was able to replicate your results (this is why assume $q_0$ has only a typo and you actually did the algebra with the correct $q_0$).
I suggest that the discrepancies to the paper are indeed connected to the Surplus function. But i cannot come up with any idea why this surplus function might be wrong.

Edit: Outside from the typo there was no error, @actuarialboi9 and my humble self calculated the individual surplus. If one multiplies that Surplus function with $N$ the number of people in the market results will be equal:
$\begin{equation} S= C(a,b,m) N^{\frac{b(a-1)}{a+b}} \;  \cdot \; N \;  = \; C(a,b,m)N^{\frac{a(1+b)}{a+b}} \end{equation}$