Depending on the age of the former owners, and you said one was quite ill....it could be it's an "old people" smell.
It's something that often occurs in houses that have elderly people living in them. As a realtor....we often see it in houses that are "estate sales" or when someone's parents have gone to an assisted living situation.
Call Serv-Pro, or some industrial cleaning type company, that cleans up after fires or floods.
Before I moved into this house, we had the house completely cleaned by Serv-Pro, after the entire interior was painted and the carpet replaced. The prior owners had a gazillion birds....or so it seemed - they had these huge cages, one had 30 some finches and another had about 20
, 3 dogs and 2 cats!!! The dogs and the cats were only a semi problem, but the birds were a humongous issue for me.
By the time we moved in....there was no smell whatsoever.
I know you've had the carpet cleaned, and you are doing some painting...so ask Serv-Pro or whoever is out there, if they have some heavy duty deodorizer that you can purchase. Not a floral but something else.
Also, make sure you don't have any mold anywhere. Is your house on a slab or a crawl? If it's on a crawl, make sure there is a moisture barrier over the dirt. A pest inspector will check for you....but that was probably checked out in your home inspection.