# How to cancel powered number?

How to get the result circled in red? I tried 3^\cancel{4} but it doesn't work.

• Superscripts should be braced: 3^{4} and 3^{\cancel{4}}. It's true that 3^4 works, but you need to know the precise rules of TeX to understand why. In doubt, use braces. – egreg Mar 1 '20 at 20:39
• Oh, I have used it before but i had forgotten it. – Simeon Simeonov Mar 1 '20 at 20:41

You can not to use cancel package and to adopt the simple negation \not. Here there is a small example with a screenshot:
\documentclass{article}
$3^4$, $3^{\not 4}$, $3^{\cancel{4}}$
`