Praise be to Allah.
Menses can become longer or shorter, and its time can come earlier or later, especially when using contraceptive methods such as the IUD.
The end of the menses (“becoming pure”) may be determined by one of two signs:
the emission of the white discharge, which is something known to women;
complete dryness, such that if a piece of cotton or the like is inserted in that place, it comes out clean with no trace of blood or yellowish or brownish discharge on it.
Based on that, the method that you mention for determining whether your period had ended is correct.
If the yellowish or brownish discharge follows directly on from the menses, then they are regarded as menses.
So long as you did not see the white discharge, and you did not experience complete dryness, you are still menstruating, even if it is a few days longer than your usual period, so long as it is not continued for more than fifteen days. If it lasts for longer than fifteen days, then it is istihaadah [prolonged non-menstrual bleeding] according to the majority of fuqaha’.
What appears to be the case from the question is that you have not passed that limit.
Based on this view – that whatever lasts for more than fifteen days is istihaadah – if we assume that your period has lasted for more than fifteen days, then next month you should refrain from praying and so on for the duration of your usual period, then you should do ghusl and pray, and at that time it becomes permissible to have intercourse.
Your usual period in this case is what became the usual case after you had the IUD inserted, not before.
It says in Kashshaaf al-Qinaa‘ (1/208): If her usual menses becomes shorter, then she experiences irregular bleeding [istihaadah] after that, if her period was usually ten days, then her pattern changes and it lasts for seven days, then she experiences irregular bleeding after her pattern has changed, then she should refrain from praying and so on for seven days [regarding that as her menses], because that is what her new pattern is. End quote.
In order to confirm the duration of the period, it is not stipulated that it happened repeatedly, according to the correct view.
See: ash-Sharh al-Mumti‘ (1/497).
And Allah knows best.