To check if an integer `n` is a power of four, we can take the logarithm base 4 of `n` and check whether the result is an integer. If it is an integer, then `n` is a power of four.

Here is a Python code that implements this logic:

```python
import math

def is_power_of_four(n):
    if n <= 0:
        return False
    x = math.log(n, 4)
    return x == int(x)
```

The function takes an integer `n` as input and first checks if `n` is less than or equal to 0. If it is, then `n` cannot be a power of four.

Next, it calculates the logarithm base 4 of `n` using the `math.log` function. If the result is an integer, then `n` is a power of four and the function returns `True`. Otherwise, it returns `False`.

For example, `is_power_of_four(16)` would return `True` because 16 is equal to 4^2.
Dato un numero intero `n`, restituisce true se è una potenza di quattro. Altrimenti, restituisce false. Un numero intero `n` è una potenza di quattro, se esiste un numero intero `x` tale che `n == 4^x`.