We will use congruences modulo p for fractions, writing ba≡x(modp) for b≡0(modp) if bx≡a(modp). A sum of such fractions is congruent to 0(modp) if and only if p divides the numerator of the (reduced) sum of respective usual fractions. We shall prove the statement through the following claims;
Claim 1. For a given integer r, the number of positive integers n<p such that 1+21+⋯+n1≡r(modp) is not greater than 23p32.
Let n1<n2<⋯<ns+1 be all such n. Every integer k appears at most k−1 times among the differences ni+1−ni (since ni should be a root of the congruence
x+11+⋯+x+k1≡0(modp)
having at most k−1 roots: its left-hand side becomes a polynomial of degree k−1 when multiplied by the denominator).
Consider the largest m such that 1+2+⋯+(m−1)=2m(m−1)≤s. Then s<2m(m+1). On the other hand, ns+1−n1 is the sum of s differences ni+1−ni, and
p>ns+1−n1≥1⋅2+2⋅3+⋯+(m−1)m=3m3−m.
If m≤3, the number of ni, that is, s+1, is not greater than 6=23⋅82/3<23p2/3. And, for m>3 we have
s+1≤2m(m+1)<23(3m3−m)2/3<23p2/3.
(The middle inequality m(m+1)<3(3m3−m)2/3 follows from m3(m+1)3<3(m3−m)2, i.e., m2+m<3(m−1)2.)
Claim 2. The number of good n less than pk is not greater than (23p32)k.
This can be proved by induction on k. The base case k=1 is given by Claim 1 for r=0. Note that for a good n=c+n′p, 0≤c<p, the number n′=c1+⋯+ck−1pk−2 is also good. Indeed, in the sum 1+21+⋯+n1 all the terms with denominators divisible by p make together p1(1+21+⋯+n′1), and since the remaining sum has no p in the denominator, the irreducible form of p1(1+21+⋯+n′1), too, should not have p in the denominator).
The number of good n′ does not exceed (23p32)k−1 by the induction hypothesis. For each good n′ we set −r≡1+21+⋯+n−c01 (mod p); the sum of c last terms in the sum 1+21+⋯+n1 should be r (mod p). By Claim 1, there are at most 23p32 such c, which gives the desired bound.
Turning to the main claim, we choose an integer k such that pk−1<N≤pk. The number of good numbers not exceeding N is not greater than the number of good numbers not exceeding pk, and this in its turn does not exceed
(23p32)k<(200121p32)k=(p121p32)k=p43k=p43(pk−1)43<p43N43,
which proves the desired claim for C=p43 (here we use the inequality (23)12<200).