cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A100374 Largest power of 2 dividing prime(n+1) - prime(n), the n-th consecutive prime difference.

This page as a plain text file.
%I A100374 #21 Mar 09 2025 05:11:21
%S A100374 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,
%T A100374 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,
%U A100374 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
%N A100374 Largest power of 2 dividing prime(n+1) - prime(n), the n-th consecutive prime difference.
%H A100374 Amiram Eldar, <a href="/A100374/b100374.txt">Table of n, a(n) for n = 1..10000</a>
%F A100374 a(n) = A006519(A001223(n)).
%F A100374 a(n) = 2^A023520(n). - _Michel Marcus_, Aug 26 2019
%t A100374 Table[GCD[Prime[n+1]-Prime[n], 65536], {n, 1, 256}] (* a secure quick code *)
%t A100374 2^IntegerExponent[#,2]&/@Flatten[Differences/@Partition[Prime[Range[ 110]],2,1]] (* _Harvey P. Dale_, Apr 28 2012 *)
%o A100374 (PARI) diff(v) = vector(#v-1, i, v[i+1]-v[i]);
%o A100374 lista(nn) = apply(x->(1<<valuation(x, 2)), diff(primes(nn))); \\ _Michel Marcus_, Aug 26 2019
%Y A100374 Cf. A006519, A001223, A023520.
%K A100374 nonn
%O A100374 1,2
%A A100374 _Labos Elemer_, Dec 03 2004