OFFSET
24,1
COMMENTS
The FNV-primes for n=8*trunc((2^s+5)/12) and s=5..11 are used in FNV hashes: 24, 40, 88, 168, 344, 680, and 1368.
a(n) = 0 for almost all n, thus the fraction of bit sizes suitable for the FNV hash is asymptotically smaller than any fixed fraction. In practice this is not an issue since required sizes are small and for large values some nearby size can be chosen instead. - Charles R Greathouse IV, Apr 10 2012
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 24..10000
Landon Curt Noll, Fowler/Noll/Vo (FNV) Hash
Wikipedia, Fowler-Noll-Vo hash function
EXAMPLE
a(24)=147 is binary 10010011, 2^24 + 256 + 147 = 16777619 is prime, and 16777619 > 16777600 (mod 1099494850560). With 24 = 8*trunc((2^5 + 5)/12) this prime is used for 2^5 = 32-bit FNV-hashing. For 2^6 = 64-bit FNV-hashing a(40)=179 with 40 = 8*trunc((64 + 5)/12) determines the FNV-prime 1099511628211.
MATHEMATICA
a[n_] := Module[{t}, For[m = 15, m <= 241, m++, t = DigitCount[m, 2, 1]; If[t > 3 && t < 6 && PrimeQ[t = m + 2^n + 256] && Mod[t, 1099494850560] > 16777600, Return[m]]]; 0]; Table[a[n], {n, 24, 100}] (* Jean-François Alcover, Oct 10 2017, translated from PARI *)
PROG
(PARI) a(n)=my(t); for(m=15, 241, t=vecsum(binary(m)); if(t>3&&t<6&& isprime(t=2^n+256+m)&&t%1099494850560>16777600, return(m))); 0 \\ Charles R Greathouse IV, Apr 10 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank Ellermann, Sep 13 2011
STATUS
approved