What are the oldest known writings that state that Mary was without sin?
The earliest Christian writings outside the bible are from what are called the Church Fathers, from around the middle of the second century onwards for a few hundred years.
On the Immaculate Conception explicitly, the earliest would appear to be Hippolytus and Origen:
Earlier writers hint at the doctrine, by comparing Mary to Eve, who was created without the stain of sin:
There are further, later comments where I found those but those are the earliest cited. These four are the earliest of the Fathers.
It is important to note that before the "Edict of Milan" the church was a persecuted Church and the Gospel as well as the traditions passed on by the apostles were spread orally and in many distant geographical areas.
After the Edict, Christians under the protection and support of the Emperor Constantine where able to freely practice and articulate those truths that were preserved.
The Church now freed from persecution would as they should, define, by the bishops and presbyters, firstly those things concerning Christ. Which they did in the formulation of the Creed. The kingdom of God (the Church) now free to blossom into the biggest of trees, had many more things to address. Arianism, gnostism, montanism, Sabellianism, the early teachings of some that concerned the Lord himself, primacy of concern.
When the Church, after addressing the heretical teachings in the early times, now could address other concerns.
We have the writings of Saint Ambrose:
We have the first century cave pictures of Mary at Saint Agnes, depicting Mary as very present and having even then her unique roll as intersesser.
Then of course there is the
Greek Text 250 AD.
These doctrines preserved in tradition by the bishops and the faithful were past down most likely from its origins in the Large city of Ephesis where the Evangelist John preached and with him under his care by the instruction of God, The Virgin Mary spent many days preaching and reciting all those things that were not written but understood organically in oral tradition.
A correction the Lord gave to the crowd when a woman suggested that she was blessed for baring Jesus and breast feeding him. The correction was not to rebuke the woman and have Christ take away the very honor that the stranger gives to The Mother of God, but to instruct her as to why She and anyone else would be considered blessed. To hear the word of God and obey it as Mary did with her consent to be "The Women" of Prophecy.
Christ heard the will of God the Faher and obeyed it, despite the human desires of the flesh, in the same way, Mary too hears the will of the lord and obeys.
Conceived without sin, saved by Christ prior to birth from any and all sin, She continues even now to do the will of God.
To be full of grace to such an extent as to conceive the 2nd Person of the Holy Trinity is incompatible with sinning.
Pope Pius IX gives in his dogmatic definition on the Immaculate Conception, Ineffabilis Deus (1854), many reasons for Mary's sinlessness. Here's what he says about Luke 1:28 and Luke 1:42:
He also says: