Solution:
Answer: (21,−121)
From the given formula, we pull out the term n3k from O(n41), making f(n)=log(n)+γ+nc+n2d+n3k+O(n41). Therefore,
f(n+1)−f(n)=log(nn+1)−c(n1−n+11)−d(n21−(n+1)21)−k(n31−(n+1)31)+O(n41)
For the left hand side, f(n+1)−f(n)=n+11. By substituting x=n1, the formula above becomes
x+1x=log(1+x)−cx2⋅x+11−dx3⋅(x+1)2x+2−kx4⋅(x+1)3x2+3x+3+O(x4)
Because x is on the order of n1, (x+1)31 is on the order of a constant. Therefore, all the terms in the expansion of kx4⋅(x+1)3x2+3x+3 are of order x4 or higher, so we can collapse it into O(x4). Using the Taylor expansions, we get
x(1−x+x2)+O(x4)=(x−21x2+31x3)−cx2(1−x)−dx3(2)+O(x4).
Coefficient comparison gives c=21 and d=−121.