ap will give = a2, a3, a5, a7, a11, a13 ....
and
(ap)* = (a2)*, (a3)*, (a5)*, (a7)*, (a11)* ...
which is equals to Ɛ, a2, a4, a6, a8, ..... a3, a6, a9, a12........ a5, a10, a15........ a7, a14, a21......
from sieve of Eratosthenes (prime no algorithm) it will cover all string except length 1.
i,e. Ɛ, a2, a3, a4, a5, a6, a7, a8 .....
So No of states in NFA = 3