This could be done efficiently with IntegerDigits[n, p] or here is an alternative idea:
In[1]:= pow[n_, p_] := p^Reap[NestWhile[(# - p^Sow[Floor[Log[p, #]]]) &, n, Positive];][[2, 1]]
In[2]:= pow[103^3, 2]
Out[2]= {1048576, 32768, 8192, 2048, 1024, 64, 32, 16, 4, 2, 1}
In[3]:= Total[%]
Out[3]= 1092727
In[4]:= pow[103^3, 5]
Out[4]= {390625, 390625, 78125, 78125, 78125, 15625, 15625, 15625, 15625, 3125, 3125, 3125, 3125,
625, 625, 625, 125, 25, 25, 25, 25, 1, 1}
In[5]:= Total[%]
Out[5]= 1092727
A faster equivalent would be
pow1[n_, p_] := Module[{d = IntegerDigits[n, p] /. m_Integer :> ConstantArray[1, m]},
Flatten[d p^Range[Length[d] - 1, 0, -1]]]