date_range fails when I try to generate ones with 1 periods and freq equal WOM-1MON 
#### Code Sample

```python
import pandas as pd
pd.date_range('20100104', periods=2, freq='WOM-1MON')  # works
pd.date_range('20100104', periods=1, freq='WOM-1MON')  # fails
```

```python-traceback
Traceback (most recent call last):
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2910, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-31-ec0b4bad59c9>", line 1, in <module>
    pd.date_range('20100104', periods=1, freq='WOM-1MON')
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 2057, in date_range
    closed=closed, **kwargs)
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/util/_decorators.py", line 118, in wrapper
    return func(*args, **kwargs)
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 324, in __new__
    ambiguous=ambiguous)
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 531, in _generate
    index = _generate_regular_range(start, end, periods, offset)
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py", line 2009, in _generate_regular_range
    dates = list(xdr)
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/tseries/offsets.py", line 2960, in generate_range
    end = start + (periods - 1) * offset
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/tseries/offsets.py", line 425, in __rmul__
    return self.__mul__(someInt)
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/tseries/offsets.py", line 422, in __mul__
    **self.kwds)
  File "/Users/mmngreco/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/pandas/tseries/offsets.py", line 1671, in __init__
    raise ValueError('N cannot be 0')
ValueError: N cannot be 0
```
#### Problem description

If N is equal to periods then is not 0 as we can see, that make me think that probably there is something wrong in the code.

#### Expected Output

```python
Out[33]: DatetimeIndex(['2010-01-04'], dtype='datetime64[ns]', freq='WOM-1MON')
```

#### Output of ``pd.show_versions()``

<details>

pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Darwin
OS-release: 17.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: es_ES.UTF-8
pandas: 0.22.0
pytest: 3.4.2
pip: 9.0.1
setuptools: 38.5.1
Cython: 0.27.3
numpy: 1.14.2
scipy: 1.0.0
pyarrow: 0.9.0
xarray: 0.10.2
IPython: 6.2.1
sphinx: 1.7.1
patsy: 0.5.0
dateutil: 2.7.0
pytz: 2018.3
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: 0.4.0
matplotlib: 2.2.2
openpyxl: 2.5.1
xlrd: 1.1.0
xlwt: 1.2.0
xlsxwriter: 1.0.2
lxml: 4.2.0
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.5
pymysql: 0.8.0
psycopg2: None
jinja2: 2.10
s3fs: 0.1.3
fastparquet: 0.1.4
pandas_gbq: None
pandas_datareader: None


</details>
