Couldn't you use ? Then if and only if k is one of the numbers in your set.
Assume a set of N number (n1, n2 , n3 , n4, n5 Nn)
A function of this N numbers f (n1, n2, n3 .Nn) = F
Given a number Nx, I want to see whether it is part of the set by using the value F and Nx.
In other words I dont want to compare Nx with the set sequentially to find it out, Instead use F and Nx and find it.
If you know of any mathematical model which can help me in this situation please let me know. Or you can point me to area where I can study further.