A262136 Number of distinct fractional parts of the numbers Sum_{i=j..k} (-1)^i/i with 1 <= j <= k <= n, where the fractional part of x is given by x - floor(x).
1, 2, 4, 7, 11, 14, 20, 27, 35, 44, 54, 64, 76, 89, 103, 118, 134, 151, 169, 186, 206, 227, 249, 272, 296, 321, 347, 374, 402, 430, 460, 491, 523, 556, 590, 625, 661, 698, 736, 775, 815, 854, 896, 939, 983, 1028, 1074, 1121, 1169, 1218, 1268, 1319, 1371, 1424, 1478, 1532, 1588, 1645, 1703, 1762
Offset: 1
Keywords
Examples
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.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..1000
Programs
-
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}]
Comments