I did give this in my thread on summing divergent series but there is a method that can sometimes be used to tell if a series is divergent and tell us a bit more about the divergence - Ramanujan Summation. It's based on the Euler-Maclauren series; a not what I would call rigorous, but short, derivation I will now give. Define the linear operator Ef(x) = f(x+1). Define Df(x) = f'(x). Also f(x+1) = f(0) + f'(x) + f''(x)/2! + f'''(x)/3! ... (the Maclauren expansion), or Ef(x) = f(x) +Df(x) + D^2f(x)/2! + D^3f(x)/3! ... = e^Df(x). We Also need the Bernoulli numbers which are defined by the expansion of x/(e^x - 1) = ∑B(k)*x^k/k! - you can look up the values with a simple internet search.
f(0) + f(1) + f(2) ... f(n-1) = (1 + E + E^2 ++++++E^(n-1))f(0) = (E^n -1/E-1)f(0) = (E^n -1)(1/e^D -1)f(0) = D^-1*(D/e^D -1)f(x)|0 to n = D^-1f(x)|0 to n + ∑ B(k)*D^(k-1)f(x)/k!| 0 to n = 0 to n ∫f(x) + ∑B(k)*D^(k-1)f(n)/k! - ∑B(k)*D^(k-1)f(0)/k!. Now the sum is from 1. Let n → ∞ and most of the time Sn = ∑B(k)*D^(k-1)f(n)/k! → 0 so we will assume that - certainly its the case for most convergent series since,usually, d^n/dx f(n) → 0 for all n. So you end up with ∫f(x) - ∑B(k)*D^(k-1)f(0)/k!. So f(0) + f(1) + f2) +f(3) ...= ∫f(x) - ∑B(k)*D^(k-1)f(0)/k!. Notice regardless of n (- ∑B(k)*D^(k-1)f(0)/k!) does not depend on n and is called the Ramanujan sum. Again note the sum is from 1. We would like the Ramanujan Sum to be the same for convergent series. This is done by defining it as ∫f(x) + C where C is the Ramanujan sum. If it is finite then it is ∫f(x) + C. If it is infinite it is defined as C.
It makes mincemeat out of summing the Harmonic Series. 1/n → 0 as n→∞. Same for the derivatives. So that part is satisfied - ie you can neglect the middle bit and get Σ1/n = ∫1/x+1 +R where R (the Ramanujan Sum) is the Euler-Mascheroni constant. You see immediately its (1 to ∞) ∫1/x + R after a change of variable x' = x+1 we have In (∞) + R'
You get a deeper appreciation of what's going on if you use Ramanujan summation on the zeta function ζ(s):
https://en.wikipedia.org/wiki/Riemann_zeta_function
If s>1 its convergent (integral test) and you get ζ(s): = (0 to ∞)∫1/(x+1)^-s + R where R is the Ramanujan sum. But a little work with integration shows this is 1/(s-1) + R and is true for any s > 1. So one gets ζ(s) - 1/(s-1) = R. Now the trick; R is holomorphic in the complex plane so can be extended to the entire plane. So we have ζ(s) = 1/(s-1) + R valid for the entire plane except for a non-removable singularity at s =1 ie the Harmonic series. By analytic continuation do things like 1+1+1... become finite? I will leave that for you to ponder - there is an ∞ - ∞ hidden deep in there. But there is no trick I am aware of to get rid of that singularity - some divergent series you can use tricks (a bit more of that later) to sum it and get sums for things like 1 +1 +1 + 1... which is obviously not summable - or is it? See later.
There is another function called the Eta function defied by η(s) = 1 - 1/2^s + 1/3^s - 1/4^s ... (Note by the alternating series test this is convergent for s>0). Now one can easily derive a simple relation between the two:
https://proofwiki.org/wiki/Riemann_Zeta_Function_in_terms_of_Dirichlet_Eta_Function
We have ζ(s) = 1/(1 - 2^(1-s))*η(s). Which make ζ(s) convergent for s>0 except for s = 1. What happened? Well in the derivation you started with ζ(s) - η(s) so divergences may cancel and you are left with a finite number. Of course that finite number must be the number from analytic continuation - so really you have a hidden infinity cancellation - somehow..
This is very easily seen in 1 + 1 + + 1 ... Its obviously ∞. But wait using the above equation you have 1 + 1 + 1 ... = (1 - 1 + 1 - 1...)/-1
Now 1 - 1 + 1 - 1...is called Grande's Series and is in fact 1/2. Some simply can't see this so I will explain it very carefully. 1 - x + x^2 - x^3... is convergent for |x|<1 (ratio test) and is 1/(1+x). It is not convergent for x=1. But wait - how about if x = 1-1/n then it is convergent for all n. If n is very large - (you know typical non rigorous calculus stuff) you have for all practical purposes 1/n is zero - in fact if you want you can take the limit n→∞. So intuitively, and for all practical purposes 1 - 1 +1 -1 + 1... = 1/2. Rigorously we can generalize Abel's theorem and take the limit x- → 1:
https://en.wikipedia.org/wiki/Abel's_theorem
Some however say things like S = 1 - 1 + 1 - 1...1 - 1 + 1 - 1... = S + S or S =0 so is inconsistent. Well the answer lies in the definition of an infinite sum which says you can't do that except in some cases - but that would take us off topic. I simply wanted to show its very reasonable if its 1/2 - in fact so reasonable it can't really be anything else.
In fact its an example of a summation method called Abel Summation - but that will take us too far.
The thing to note is 1 - 1 + 1 - 1... = 1/2 so 1 +1 +1 +1 ... = -1/2. The infinity in 1+1+1... must be canceled by something - it's in the Eta function - somehow it cancels it out.
Have a bit of a muck around using Ramanujan summation and look at ζ(s) - η(s). I haven't done it so see what you find out.
Thanks
Bill