36. When p=2, an=13, we know a=13,n=1. When p>2, since p is a prime, p is an odd number, at this time
2p+3p=(2+3)(2p−1−2p−2×3+⋯−2×3p−2+3p−1),
thus 5∣an, which means 5∣a. If n>1, then 52∣an, in this case, we should have
2p−1−2p−2×3+⋯−2×3p−2+3p−1≡0(mod5)
Using 3≡−2(mod5), p is an odd number, and the above equation, we know
≡=2p−1−2p−2×3+⋯−2×3p−2+3p−1p↑2p−12p−1+2p−1+⋯+2p−1p⋅2p−1≡0(mod5)
Therefore, 5∣p, and since p is a prime, p=5, which leads to an=25+35=275=52×11,n can only be 1, a contradiction.
Thus, n=1.