A261878 Number of distinct fractional parts of the sums 1/j+...+1/k with 1 <= j <= k <= n, where the fractional part of x is given by x - floor(x).
1, 2, 4, 7, 11, 15, 21, 28, 36, 45, 55, 64, 76, 89, 103, 118, 134, 151, 169, 187, 207, 228, 250, 273, 297, 322, 348, 375, 403, 432, 462, 493, 525, 558, 592, 627, 663, 700, 738, 777, 817, 858, 900, 943, 987, 1032, 1078, 1125, 1173, 1222, 1272, 1323, 1375, 1428, 1482, 1537, 1593, 1650, 1708, 1767
Offset: 1
Keywords
Examples
a(3) = 4 since the four numbers 1/1, 1/2, 1/3, 1/2+1/3 = 5/6 have pairise distinct fractional parts. a(6) = 15 since 1/1 and those 1/j+..+1/k with 1 < j <= k <= 6 and (j,k) not equal to (2,6), have pairwise distinct fractional parts, but 1/2+1/3+1/4+1/5+1/6 = 29/20 and 1/4+1/5 = 9/20 have the same fractional part.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..1200
Programs
-
Mathematica
frac[x_]:=x-Floor[x] H[n_]:=HarmonicNumber[n] S[n_]:=Table[frac[H[n]-H[m-1]],{m,1,n}] T[1]:=S[1] T[n_]:=Union[T[n-1],S[n]] Do[Print[n," ",Length[T[n]]],{n,1,60}]
Comments