Disclaimer: My assumption is that this is not a high-level job where a background check will be conducted upon the submission of your resume. If that is the case, then please disregard the below suggestion as it will not apply to your case. My assumption is that there is a large pool of applicants and you want to maximize the chances to make it to the short list/interview stage.
If you leave it on...
Every single employer will ask you, "Why did you only work there for X weeks?"
Some employers may simply throw your resume in to the bin because of such a short term employment (especially if there is no explanation in the resume).
If you leave it off...
Some employers will ask you, "Why is there a gap of X weeks in your resume?"
They may know you were employed (due to LinkedIn or headhunters) or may not. Regardless, you have to give an answer to explain the gap.
If you had a job immediately following those X weeks, and a job immediately preceding them, then don't list dates on your resume (you can just list months, since you will have no gap that way):
- August 2004-September 2005: Company X
- September 2005-September 2005: Company Y
- October 2005-Present: Company Z
Clearly you can leave out the "company Y" portion without raising any eyebrows.
If you didn't, and the gap will show up regardless, I would suggest to leave it off the resume. Prepare to have it asked in interviews. You can answer it many ways.
- Truthful: "I left company X for reason Y"
- Embellished: "I was at a point where I wasn't sure where I wanted to go with my career"
- Untruthful: "I spent X weeks working on a side project/personal business/taking care of an ill family member, etc."
Which you pick is up to your sense of ethics, how bad the reason for leaving job X was, what you did before and afterwards, etc.
If you have a good reason (I joined company X immediately before they got sued by Google for patent infringement) then truthful is fine. No harm, no foul, what can you do if the company goes bankrupt or faces impending doom totally unrelated to your hiring? If the reason is not so good (you got fired, you quit in a huff, you got a better offer and immediately jumped ship), then your ethics will determine how dishonest of a response to give (just ambiguous, or downright untrue).