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.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Dec 03 2004

Keywords

Crossrefs

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) = A006519(A001223(n)).
a(n) = 2^A023520(n). - Michel Marcus, Aug 26 2019