This works for whole numbers. Simply add up the digits in the number. The resulting number should be small enough to divide by three in your head. If that number is evenly divisible by three, so is the original number. I heard this long ago in fourth grade.

Examples :
45
4 + 5 = 9
9 / 3 = 3

2550
2 + 5 + 5 + 0 = 12
12 / 3 = 4

1290363
1 + 2 + 9 + 0 + 3 + 6 + 3 = 24
24 / 3 = 8
or, if you don't like dividing 24 by 3,
24
2 + 4 = 6
6 / 3 = 2

Voila!