Ack, can't find it. Here's a reconstruction of the solution:
Assign a 'weighing code' to each marble, indicating for each weighing whether you are going to put it on the left pan (L), the right pan (R), or neither, eg LRR. After each weighing record which pan is heavier with either L, N or R, and there are two possibilities: if the odd marble is heavier, you'll get its weighing code. If it's lighter, you'll get the inverse of its weighing code (ie L instead of R, R instead of L.) This will work provided the weighing codes obey three rules:
1. They must be distinct.
2. No code may be the inverse of another.
3. They must balance, ie equal numbers of marbles on the L and R pans for each weighing.
First consider the problem with 12 marbles and 3 weighings. NNN is self-inverse. Here are the other codes, paired with inverses and arranged in groups. For brevity, some groups will be indicated just by a description.
2 'N's, 1 'L' / 2 'N's, 1 'R' (3 pairs)
1 'N', 2 'L's / 1 'N', 2 'R's (3 pairs)
2 'R's, 1 'L' / 2 'L's, 1 'R' (3 pairs)
A suitable set of weighing codes would be the left-hand side of each group, except the last group, which is ignored. Incidentally this guarantees that you will know whether the odd marble is heavier or lighter.
With 4 weighings, only NNNN is self-inverse. The remaining groups are:
3 'N's, 1 'L' / 3 'N's, 1 'R' (4 pairs)
2 'N's, 2 'L's / 2 'N's, 2 'R's (6 pairs)
3 'R's, 1 'N' / 2 'L's, 1 'N' (4 pairs)
2 'R's, 1 'L', 1 'N' / 2 'L's, 1 'R', 1 'N' (12 pairs)
3 'L's, 1 'R' / 3 'R's, 1 'L' (4 pairs)
The odd one of 40 marbles can be found by using the left-hand side of every group except the last, and using NNNN as the weighing code for the 40th marble. I don't think you can do it with 41, and certainly not with more marbles.