Observations on A100004

Russ Cox russcox at gmail.com
Mon Nov 8 17:50:23 CET 2004


The correct pedantic description is "bit to left of least
significant 1 bit in binary expansion of n".  

int
a(int n)
{
	return (n & ((n&-n)<<1)) ? 1 : 0;
}

Russ





More information about the SeqFan mailing list