Linearity test
Using the Mathematica hash function and arbitrary integers.

Tested up to n = 2 ^ 20 , generating random numbers up to (2 ^ 20) ^ 100 = (approximately 10 ^ 602)
Just in case ... the program:
k = {}; For[t = 1, t < 21, t++, i = 2^t; Clear[a, b]; Table[a[RandomInteger[i^100]] = 1, {i}]; b = Table[RandomInteger[i^100], {i}]; Contains = False; AppendTo[k, {i, First@Timing @For[j = 2, j <= i, j++, Contains = Contains || (NumericQ[a[b[[j]]]]); ]}]]; ListLinePlot[k, PlotRange -> All, AxesLabel -> {"n", "Time(secs)"}]
Dr. belisarius
source share