UPDATE: I updated the article a bit to better explain decimal expansion to negabinary
Ok, here is where I go and really geek out a bit. Scott presents a simple javascript to display negative numbers as red. He takes a nice clean straightforward approach by using javascript to inject a CSS class on specific elements that have a negative number.
As his script merrily iterates its way through the page’s elements, it checks the values of the element to see if the first character is a “-” (dash). And this works just fine for the majority of you people so thoroughly...
You know you’re a big geek when a sequence of numbers with an interesting property just pops in your head. No, I’m not talking about myself (this time). Jayson Knight is the big geek as he noticed a pattern in a sequence of numbers that popped in his head...
This just popped into my head the other day for no other reason than to bug me: Square all odd numbers starting with 1...subtract 1 from the result...then divide by 8. Now look for the pattern in the results.
He even provides a code sample to do...