Arcana Coelestia #4670
4670. 'A son of seventeen years' means His state. This is clear from the ages measured in years of people mentioned in the Word - spiritual realities and states are meant by them, as these are by all other numbers. For all numbers in the Word have spiritual realities and states as their meaning, see 575, 647, 648, 1988, 2075, 2252, 3252, 4264, 4495, as also do years, 487, 488, 493, 893.
[2] It does indeed seem as though numbers of years, or ages measured in years, mean nothing else than numbers of years. This is because these numbers more than any others have so to speak a more specific historical application. But these numbers too include spiritual realities and states within them, as is clear from the applications given at Genesis 5 and from what has been stated at Genesis 17:1 and Genesis 25:7 about Abraham's age and at Genesis 35:28 about Isaac's. The same is clear in addition from the fact that no historical detail exists anywhere in the Word which does not include within it something heavenly into which it is also changed when it passes from the thought of the reader to the angels present with him, and through those angels into heaven where the spiritual sense rises up out of every historical reference in the Word.
[3] But what is meant by Joseph's being seventeen years old may be seen from the meaning which this number has elsewhere, namely a beginning, in this case the beginning of the representation through Joseph. As to its meaning a beginning and that which is new, see 755, 853. What is more, this number includes within itself in a general way, and so to speak potentially, all the things that are represented by 'Joseph' - 'seven' meaning that which is holy and 'ten' remnants. For 'seven' when used in the Word adds holiness to any meaning, see 881, while 'ten' means remnants, 576, 1906, 2284. The remnants present in the Lord were Divine and His own, and by means of them He united the Human Essence to the Divine Essence, 1906.
Arcana Coelestia #4496
4496. 'When they were in pain' means evil desires. This is clear from the meaning of 'the pain' that follows circumcision as evil desire. The reason why such desire is meant by that pain following circumcision is that 'circumcision' means purification from self-love and love of the world, 2039, 2044, 2049, 2632, 3412, 3413, 4462, and every desire of the flesh stems from those loves. This is why 'pain' means such desire. Indeed when a person is being purified from those loves, as happens when he is being regenerated, he suffers pain and distress. It is the desires which are being removed that feel the pain and distress. When some arcanum is represented by means of a religious ceremony every part of the ceremony through to the completion of it embodies some facet of that arcanum. For example, the daggers or knives used in circumcision did so, as did their being made of flint, 2093 (end), 2046 (end), 2799; the blood that flowed at that time did so, and the method employed, and thus the state also. The same is also evident from the procedures followed in cleansings, inaugurations, and consecrations, and all other ceremonies. Here 'the pain' that followed circumcision means the desire on the part of Hamor, Shechem, and the men of his city for the external things in which alone Jacob's descendants had any interest, dealt with above in 4493.