That is complex to answer as the blast itself can kill, blast effects can kill, the thermal flash can kill, and the radiation can kill.
- If you are close enough the thermal flash will cook (or even vaporize) you before the blast reaches you, this happens so fast that the pain signals could not make it to the brain before you died. Further out you get various levels of burns, which will certainly hurt unless something else kills you.
- Very close the blast can be intense enough to compress your body and kill you before the pain signals could reach your brain. Further out you will feel pain and you may or may not die.
- The blast effects will probably NOT be able to kill you fast enough and will be quite painful. In fact there are movies of animals restrained during nuclear tests where they were exposed to flying blast debris (not the direct blast) actually jumping out of the restraints bellowing in pain and running off with pieces of the debris (e.g. glass shards, wood splinters) sticking out of their body.
- The radiation is even more complicated: very close but protected from the thermal flash you might receive 10000 REM or more which kills the brain instantly, but lower doses further out (or from fallout) will almost certainly be very painful and can take weeks to months of suffering before you either die or recover.