Newman–Shanks–Williams prime should not be confused with Williams prime.
In mathematics, a Newman–Shanks–Williams prime (NSW prime) is a prime number p which can be written in the form
S2m+1=
\left(1+\sqrt{2 | |
\right) |
2m+1+\left(1-\sqrt{2}\right)2m+1
NSW primes were first described by Morris Newman, Daniel Shanks and Hugh C. Williams in 1981 during the study of finite simple groups with square order.
The first few NSW primes are 7, 41, 239, 9369319, 63018038201, …, corresponding to the indices 3, 5, 7, 19, 29, … .
The sequence S alluded to in the formula can be described by the following recurrence relation:
S0=1
S1=1
Sn=2Sn-1+Sn-2 foralln\geq2.