There are 2 other issues I missed ::
(1) Each bit of āNā can be either 0 or 1 and you are trying to assign non-binary values ( 2 to 31 )
(2) There is a possible conflict when each index is being assigned twice
Eg: When i is 1, you constraint N[1] and N[2]
When i is 2, you constraint N[2] and N3]
N[2] is being constrained twice. If the constrained values are different there would be a conflict