Let $f(x,y)=xy/(x+y)$, Let $\phi$ be a formal variable, and define a sequence $\lambda_n$ as follows:
$$\lambda_1=\phi^2+\phi^1$$ $$\lambda_2 = f(\phi^4 + \phi^3, \phi^2) + \phi^1$$ $$\lambda_3 = f(f(\phi^6+\phi^5, \phi^4) + \phi^3, \phi^2) + \phi^1$$ $$\lambda_4 = f(f(f(\phi^8+\phi^7,\phi^6)+\phi^5, \phi^4) + \phi^3, \phi^2) + \phi^1$$ $$\lambda_5 = f(f(f(f(\phi^{10}+\phi^9, \phi^8)+\phi^7,\phi^6)+\phi^5, \phi^4) + \phi^3, \phi^2) + \phi^1$$ and so on.
You can see when you enter $\lambda_5$ into Wolfram, it will generate a nice visual form of $\lambda$. But, it also integrates $\lambda$ into a form I'm unfamiliar with:
$$\int \lambda_5 d\phi = \frac{A + B}2 + \frac \phi 6 (2 ϕ^2 + 3 ϕ - 6) + C_0$$
where
$$A = \sum_{ω: ω^4 + ω^3 + ω^2 + ω + 1 = 0} \frac{ω^3 \log(ϕ - ω) + ω \log(ϕ - ω) + \log(ϕ - ω)}{4 ω^3 + 3 ω^2 + 2 ω + 1}$$
$$B = \sum_{ω: ω^4 + 3 ω^3 + 3 ω^2 + 3 ω + 1 = 0} \frac{ω^3 \log(ϕ - ω) + 2 ω^2 \log(ϕ - ω) + 3 ω \log(ϕ - ω) + \log(ϕ - ω)}{4 ω^3 + 9 ω^2 + 6 ω + 3}$$
My question is how to evaluate $A$ and $B$ for these particular $A,B$. Are they integrals over the zero sets of those polynomials in the complex plane using? Why are they written this way as sums from Wolfram side? Could you please rewrite it in a more familiar mathematical notation, or point me to where this kind of sum would be defined? You don't need to solve the integral for general $\lambda$.
Bonus points for how these sums actually come from the formula $\lambda 5$ - i.e. where did the polynomials $\omega^4+\cdots$ actually come from?
(Edit, I forgot there are finitely many roots)