It's the formula. He'd do better if you cut it out entirely, since breastfed babies don't get constipated. Breastmilk is a kind of laxative.
I saw your post, and need to tell you that it is VERY dangerous to give plain water or sugar water to babies. Their bodies are not balanced to have water, and they should not have water until they are eating solid food as well, at six months. You can cause basically the equivalent of water intoxication, and that leads to brain swelling. Please research this before you do it again, since you could really harm your son. Also, babies have an open gut, and the sugar is NOT good for him because you are harming the probiotic bacteria in his belly. Please, please, don't resort to this method again. If you must use formula and see constipation again, nurse him instead and cut out the formula for a few feeds.
Note from a science:
For newborns (especially under 4-5 weeks), water supplements can be risky
* Babies under two months should not be given supplemental water.
* Water supplements are associated with increased bilirubin levels in jaundiced newborns.
* Too much water can lead to a serious condition called oral water intoxication.
* Water supplements fill baby up without adding calories, so water supplements can result in weight loss (or insufficient weight gain) for the baby.
It is COMMON for bf babies, around a month, to stop pooping every day. This is NORMAL. It's not constipation; it's because the infant is using most of the nutrients in the milk and there is not much waste. Be aware of that in the future.
I know a lot of people will tell you "we did corn syrup and our baby is fine," but a lot of us rode without car seats and are fine, and that doesn't mean it's not dangerous. Do your son a favor and really research this with the AAP and WHO, not people who are still listening to their grandmas.