except for n=5 no other value satisfies the condition.
we can prove it logically...
n should be a prime number hence it should be odd(2 is not included).
let the prime number have 1 in units plase then 4n^2+1 will have 5 in the units place hence 1 is not permitted.
let the prime number have 3 in units place then 6n^2+1 will have 5 in units place hence it is not permitted.
similarly for 7,9 also it is not possible.
but only when n=5 it satisfies the condition