OFFSET
1,2
COMMENTS
Note that (-1)^n/n+(-1)^(n+1)/(n+1) = (-1^n/(n*(n+1)) for any n > 0.
Conjecture: (i) Suppose that sum_{i=j,...,k}(-1)^i/i and sum_{r=s,...,t}(-1)^r/r with 0 < min{2,k} <= j <= k, 0 < min{2,t} <= s <= t and j <= s have the same fractional part, but the ordered pairs (j,k) and (s,t) are different. Then sum_{i=j,...,k}(-1)^i/i = sum_{r=s,...,t}(-1)^r/r. Moreover, if j is odd, then j > 1, k = j*(j+1) and (s,t) = (j+2,j*(j+1)-1); if j is even, then either (k = j+1 and s = t = j*(j+1)), or (k = j*(j+1)-1 and (s,t) = (j+2,j*(j+1))).
(ii) Let a > b >= 0 and m > 0 be integers with gcd(a,b) = 1 < max{a,m}. For each r = 0,1, the numbers sum_{i=j,...,k}(-1)^(i-r*j)/(a*i-b)^m with 1 <= j <= k and (j > 1 if k > a-b = 1) have pairwise distinct fractional parts.
This is an analog of the conjecture in A261878. Part (i) of the conjecture implies that a(n) = n*(n-1)/2 + 2 - floor((sqrt(4n+1)-1)/2) - floor((sqrt(4n+1)-1)/4) for all n > 1.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..1000
EXAMPLE
a(6) = 14 since the sums (-1)^j/j+...+(-1)^k/k with 0 < min{k,2} <= j <= k <= 6 and (j,k) different from (4,6) and (6,6) have pairwise distinct fractional parts, but (-1)^6/6 = (-1)^2/2+(-1)^3/3 and 1/4-1/5+1/6 = 1/2-1/3+1/4-1/5.
MATHEMATICA
frac[x_]:=x-Floor[x]
u[0]:=0
u[n_]:=u[n-1]+(-1)^n/n
S[n_]:=Table[frac[u[n]-u[m-1]], {m, Min[2, n], n}]
T[1]:=S[1]
T[n_]:=Union[T[n-1], S[n]]
Do[Print[n, " ", Length[T[n]]], {n, 1, 60}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Sep 11 2015
STATUS
approved