Seismicity is dynamically simulated by one-dimensional mass-spring model with fractal distribution of breaking strengths. A linearly rapidly-weakening-and-hardening friction law controls the sliding of the mass. The frequency-magnitude relations from synthetic seismicity for five values of fractal dimension show that b-values for events with intermediate magnitudes are close to 1, while those for events with larger magnitudes are from 1.68 to 2.52. For small events, the logN values are almost constant.