Superstition about the number 666
Question

I heard that the number 666 is the devil's number. Is this a superstition? If yes, what if one avoids writing it only because he or she does not want to imitate the kuffar. Also, is there any supplication or dua one could say as an expiation for any superstion? What if one avoids actions or does actions due to beleif of superstitions? How can one repent?
Praise be to Allah.Is the number 666 the number of the devil (Shaytaan)?
Believing that there is anything special about the number 666, especially with regard to benefit or harm, and believing that it is the number of the devil or of the Dajjaal (“antichrist”) is a global myth which originated with people of disbelief (kufr), especially those who claim to be devil worshippers.
Hence it is not permissible for the Muslim to believe that there is anything special about this number; rather it is like all other numbers which indicate the quantity of things. The one who believes that it has any special impact has fallen into what is haraam by imitating the disbelievers and following their myths and superstitions.
It was narrated that Ibn ‘Umar said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever imitates a people is one of them.” Narrated by Abu Dawood (4031); classed as saheeh by al-Albaani in Irwa’ al-Ghaleel (5/109).
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
This is a jayyid isnad… This hadith, at the very least, indicates that it is prohibited to imitate them, even though it appears to indicate that the one who imitates them is a disbeliever, as in the verse in which Allah, may He be exalted, says (interpretation of the meaning):
{And whoever is an ally to them among you - then indeed, he is [one] of them} [al-Maa’idah 5:51].
This may be understood as meaning that whoever imitates them in everything, that would dictate that he is a disbeliever, and the text indicates that it is forbidden to imitate them in some ways. Or it may be interpreted as meaning that his being like them is commensurate with the extent to which he imitates them, so that if he imitates them in something that is regarded as disbelief or a sin, or in something that is regarded as being unique to them, then the ruling will be in accordance with that.
Whatever the case, the text indicates that it is haraam to imitate them and the reason for that is mere imitation. "Iqtida’ as-iraat al-Mustaqeem (1/240-242)".
In order to be different from them, you should not believe that there is anything special about this number, and you should pay no attention to writing it; rather you should deal with it like any other number.
As for not writing it at all, that is not correct, because writing numbers when needed is permissible, and what is permissible and is needed cannot be abandoned just because some people were misguided concerning it. Rather the misguidance that is connected to it should be ignored.
‘Ikrimah said: We were with Ibn ‘Umar, and Ibn ‘Abbaas was there with him too (may Allah be pleased with them both). A crow flew by, cawing, and a man said: It is a good sign! Ibn ‘Abbaas said: It is neither good nor bad. Narrated by ad-Daynoori in al-Majaalisah (3/297).
Because of this corruption – the corruption that results from innovation being instilled in people’s hearts – the scholars forbade, for the purpose of differing from the disbelievers in their festivals, deliberately fasting on the days of their festivals and depriving oneself of delicious food on the days of their festivals.
Ibn al-Qayyim (may Allah have mercy on him) said:
If it is said: What do you say about fasting on the days of Nawruz and Mahrajan and other festivals of the polytheists?
It may be said: many of the scholars regard that as disliked (makrooh), and most of the companions of Ahmad were of the view that it is disliked.
They gave as the reason for that the fact that these are two days that are venerated by the disbelievers, so to single them out for fasting rather than other days is like going along with them in venerating those two days. Therefore it is disliked, like fasting on a Saturday. The author of al-Mughni said: By analogy, this applies to any festival of the disbelievers or any day that they single out for veneration. "aashiyat Ibn al-Qayyim ma‘a ‘Awn al-Ma‘bood (7/52)".
For more information, see the answer to the question: “Ruling on regarding numbers as lucky and unlucky” and “Ruling on regarding a twitch of the eye as unlucky.”
Secondly:
Repenting from belief in superstition is like repenting from any other sin, and is done by avoiding it, regretting doing it, and resolving not to go back to it.
An-Nawawi (may Allah have mercy on him) said:
The scholars said: Repentance from every sin is obligatory. If the sin has to do with the relationship between the individual and Allah, may He be exalted, and does not have to do with the rights of another human, then there are three conditions to be met:
1.. He must give up the sin.
2.. He must regret doing it.
3.. He must resolve never to go back to it.
If one of the three is omitted, then his repentance is not valid. "Riyaadh as-Saaliheen (p. 14)".
Giving up superstitions is achieved by believing that benefit and harm are in the hands of Allah, may He be exalted, alone.
Allah, may He be exalted, says (interpretation of the meaning):
{Say, “In whose hand is the realm of all things - and He protects while none can protect against Him - if you should know?” 
They will say, “[All belongs] to Allah.” Say, “Then how are you deluded?”} [al-Mu’minoon 23:88-89]
{Say, “Who provides for you from the heaven and the earth? Or who controls hearing and sight and who brings the living out of the dead and brings the dead out of the living and who arranges [every] matter?” They will say, “Allah,” so say, “Then will you not fear Him?”} [Yoonus 10:31].
It was narrated that ‘Abdullah ibn ‘Amr said: The Messenger of Allah (blessings and peace of Allah be upon him) said:
“Whoever lets tiyarah (superstitious belief in bird omens) stop him from doing something is guilty of shirk (associating others with Allah).” They said, O Messenger of Allah, what is the expiation for that? He said, “To say: ‘Allahumma la khayra illaa khayruka wa laa tayra illaa tayruka wa laa ilaaha ghayruka O Allah, there is no good except Your good, no birds except Your birds, and there is no god besides You).’” Narrated by Imam Ahmad in al-Musnad (11/623); classed as hasan by the commentators on al-Musnad.
The Muslim must also bear in mind the fact that these superstitions are harmful to one’s mind and intellect, and Islam came to protect people’s intellect and reason from anything that could damage them.
Shaykh ‘Abd ar-Rahmaan as-Sa‘di (may Allah have mercy on him) said:
Islam is based on perfecting people’s religious commitment by casting away idolatry and attachment to created beings, and on perfecting people’s reasoning by casting away myths and superstitions, and focusing on beneficial matters that help to refine one’s thinking and purify one’s soul, and rectifying all situations, both spiritual and worldly. And Allah knows best. "Al-Qawl as-Sadeed/al-Majmoo‘ah al-Kaamilah li Mu’allafaat as-Sa‘di (10/19)".
And Allah knows best.