From the IRS Section 1091. Loss from Wash Sales of Stock or Securities
Section 1091(a) provides that in the case of any loss claimed to have been sustained from any sale or other disposition of shares of stock or securities where it appears that, within a period beginning 30 days before the date of such sale or disposition and ending 30 days after such date, the taxpayer has acquired (by purchase or by an exchange on which the entire amount
of gain or loss was recognized by law),or has entered into a contract or option so to acquire, substantially identical stock or 3 securities, then no deduction shall be allowed under § 165
The document is not long, 4 pages, and should be read to see the intent. It's tough to choose the one snippet, but the conclusion is this is the definitive response to that question.
A purchase within an IRA or other retirement account can create a wash sale if such a purchase would be a wash sale otherwise, i.e. the fact that it's a retirement account doesn't avoid wash rules.