I want to calculate AND of numbers from 0 to (n)^{1/2} - 1 with each of the numbers from 0 to (n)^{1/2} - 1. I want to do this in O(n) time and can't use the XOR, OR, AND operations.
Specifically, can I calculate X+1 AND Y if I know X AND Y?
P.S. - RAM model is being assumed here and operations (add, multiply, divide) on < log(n) bit numbers can be done is constant time.