A090046 Length of longest contiguous block of 0's in binary expansion of n-th prime.
1, 0, 1, 0, 1, 1, 3, 2, 1, 1, 0, 2, 2, 1, 1, 1, 1, 1, 4, 3, 2, 2, 2, 2, 4, 2, 2, 1, 1, 3, 0, 5, 3, 3, 2, 2, 2, 3, 2, 1, 2, 1, 1, 5, 3, 3, 2, 1, 3, 2, 2, 1, 3, 1, 7, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 1, 1, 4, 2, 1, 1, 1, 1, 4, 3, 3, 2, 3, 2, 1, 3, 1, 1, 5, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 5, 5, 4, 3, 3, 3, 3, 3
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[n_] := Length[ Union[ DeleteCases[ Split[ IntegerDigits[n, 2]], 1, 2]][[ -1]]]; Table[ f[ Prime[n]], {n, 1, 105}] (* Robert G. Wilson v, Dec 03 2003 *)