Where are you socially secured?
There are common rules for social security in the EU/EEA which determines in which country you are socially secured. You can find more information at borger.dk.
Obligation to pay social security contributions
Social security in the Nordic countries is financed differently. The taxes paid, the amount and the basis of assessment varies between the countries. In Denmark the social contributions are paid through taxes.
Deduction for foreign social contributions
If you are covered by the social security legislation in Finland or Norway, you pay mandatory social contributions there. If the income is taxed in Denmark, you can deduct the mandatory social security contributions which you have paid in Finland or Norway in the tax return.