Can I sell my iPhone 4 with all my apps still on it?

Ok, so I want to sell my iPhone but I want to know if its (1) legal and (2) practical to sell it with all my downloaded apps on it, some apps being free while others I payed for.

Let me explain a bit.

(1) I know its legal to download apps from someone else's account onto your device, Trust me, I called Apple and checked, so that isn't my question. But I don't know its ok if I'm selling a phone and advertising my apps with it, which I'm just going to download again once I get the newest iPhone.

(2) These same apps (downloaded from someone elses account) seem to stop working when I sync my phone with iTunes (despite the fact Apple explicitly told me it's legal). I'm wondering if this is just due to a setting I have or will this happen to whoever I sell it to which basically means I'm ripping them off by claiming the phone comes with apps as they would stop working upon syncing, which I'm asking this question specifically to avoid.

iPhone wizzes, please help me out, thanks!

Might just be worth wiping the phone before you sell it? Playing it safe.