A100374 Largest power of 2 dividing prime(n+1) - prime(n), the n-th consecutive prime difference.
1, 2, 2, 4, 2, 4, 2, 4, 2, 2, 2, 4, 2, 4, 2, 2, 2, 2, 4, 2, 2, 4, 2, 8, 4, 2, 4, 2, 4, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 4, 4, 4, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 4, 2, 2, 2, 2, 4, 2, 8, 2, 2, 4, 2, 8, 4, 8, 2, 2, 2, 2, 2, 4, 2, 8, 4, 2, 4, 4, 8, 4, 8, 4, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[GCD[Prime[n+1]-Prime[n], 65536], {n, 1, 256}] (* a secure quick code *) 2^IntegerExponent[#,2]&/@Flatten[Differences/@Partition[Prime[Range[ 110]],2,1]] (* Harvey P. Dale, Apr 28 2012 *)
-
PARI
diff(v) = vector(#v-1, i, v[i+1]-v[i]); lista(nn) = apply(x->(1<
Michel Marcus, Aug 26 2019
Formula
a(n) = 2^A023520(n). - Michel Marcus, Aug 26 2019