Pension payment when working in Denmark
If you live in Sweden, you should inform Pensionsmyndigheten (the Swedish Pensions Agency) that you have earned state pension in Denmark. Pensionsmyndigheten then contacts Udbetaling Danmark who is responsible for payment to those who live in Sweden.
Taxation of pension
As a starting point, pension is taxed in the country that pays it, but certain taxes can also occur in the country of residence. In that case, the tax, which has already been paid in the "payer country", is deducted. Please contact Skatteverket (The Swedish Tax Agency) in Sweden to get more information on taxation in your situation.