if I execute the following command in Mathematica:
{a,a^2,a^3}/.a^(n_:1)->b^(2 n)
Mathematica returns:
{b^2,b^4,b^6}
but if I enter:
{a,a^2,a^3}/.a_^(n_:1)->b^(2 n)
Mathematica only returns:
b^2
Without the default value for n, Mathematica returns in both instances (a & a_):
{a,b^4,b^6}
Could someone explain why the different behavior?