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.

A071572 Least k such that nextprime(k*prime(n)) - k*prime(n) is nonprime.

Original entry on oeis.org

1, 2, 2, 1, 2, 1, 5, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 4, 1, 1, 1, 5, 1, 1, 2, 1, 1, 1, 1, 5, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 5, 1
Offset: 1

Views

Author

Keywords

Comments

The first time a value of m appears is when n equals 1, 2, 20, 45, 7. I can find no value greater than 5 for n's up through 12,500,000.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[n_] := Block[{k = 1}, While[ PrimeQ[ NextPrim[k*Prime[n]] - k*Prime[n]], k++ ]; k]; Table[ f[n], {n, 1, 105}]