What is your legal status in Denmark, and how did you achieve it? Are you a "resident alien" or an immigrant or what? What restrictions/hoops did you have to jump to get permanent residence status? What did it cost?
Unfortunately it's not the most friendly country for immigration, partly as a result of the right-wing coalition that tightened rules over the past few years (Sweden is better, as far as the Scandinavian countries go). But there are some exceptions: it's easy for EU citizens (due to being in the EU), and it's easy if you have a professional-level job offer (no US-style H1B quotas).
I'm a researcher hired by a Danish university, which made for a fairly easy fast-track visa under the "researchers scheme" [1]. In fact the entire process was by mail and took one round-trip: I mailed my passport, offer letter, photos, and application to the NYC consultate, and they mailed back my passport with a visa pasted into it. Most professionals with an offer will also be able to get a visa; it's not nearly as restricted as getting U.S. visas is. If you have an offer that pays more than 375,000 DKK ($63,500), you qualify under the "pay limit scheme" for similarly preferential treatment [2]. Getting permanent residency depends on if you're an EU citizen. If yes, it's just a matter of remaining in the country as a legal resident for at least 5 uninterrupted years. If you're from outside the EU, there are more requirements [3], including that you must be employed for 3 of the 5, and must pass a language exam establishing basic competence in the language (which is unfortunately quite difficult to speak, though the grammar and vocabulary are not particularly difficult).
I must also give them kudos for giving all of this information in not only English, but straightforward, non-legalese English. Dealing with the Danish state is generally not a horrible experience so far, even for someone who speaks no Danish.
I don't entirely understand the permanent residency for EU citizens part. As far as I understand, EU citizens have work permits and no restrictions on residency in all European countries, what would permanent residency get you on top of that?
The "free movement of labor" in the EU isn't a completely free right to live anywhere and be treated as a resident. Every EU citizen has the right to reside in another EU country for up to 3 months for any reason, and to be hired without having to apply for a work permit. But after 3 months they must register, subject to certain restrictions of the host nation, usually that the person must either have employment, be a student, or be able to show that they have sufficient funds to support themselves. In that case they get a temporary residency status that allows them to live in the country and be treated as a resident for certain purposes (such as healthcare).
Permanent residency removes any qualifying requirements, and gives the person the right to remain indefinitely in the country with full social rights (except voting), as if they were a citizen. That means, for example, that they would be eligible for the national healthcare system and state welfare system even if they found themselves long-term unemployed, which isn't normally the case for citizens of other EU countries.
Thanks so much for replying and the links. Actually the third one, permanent residency, is quite encouraging for me as I would be a "pensioner" and thus the 3-year work requirement is waived.
It's almost impossible to get a permanent citizenship in any of the scandinavian countries (besides Svalbard, which is a part of Norway, but really strange case). You either have to be some sort of highly educated person or marry someone with a permanent citizenship, and even then there are some restrictions.
Inside of EU and Schengen you should be able to get a limited work permit. Then you are usually covered by local health care after a couple of months paying tax.
That seems like a pretty low bar for "almost impossible", as I would expect most HN readers are both 1) highly educated and 2) single, and so the two avenues you mention are amongst the most accessible to them.
There are far more difficult places to gain citizenship (e.g. Liechtenstein, China).