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.

A187563 Least k >=0 and k < prime(n) such that prime(n)*(prime(n)-k)-1 and prime(n)*(prime(n)-k)+1 are twin primes or -1 if no such k exists.

Original entry on oeis.org

0, 1, -1, 1, -1, -1, 11, 7, 17, 11, -1, -1, 11, 13, 41, -1, 41, -1, 1, 11, -1, -1, 17, 41, -1, 23, 97, 11, 7, 47, -1, 59, 71, 1, 137, 31, 97, 67, 137, 119, 47, 43, 101, 7, 101, 91, 43, 13, 11, 31, 137, 71, 49, 41, 137, 47, 11, 61, 67
Offset: 1

Views

Author

Pierre CAMI, Mar 13 2011

Keywords

Comments

Conjectures: there are only 11 primes (5,11,13,31,37,53,61,73,79,97,127) for which k does not exist and there is always at least a pair of twin primes between prime(n) and prime(n)^2.

Programs

  • Mathematica
    Table[k = 0; While[k < Prime[n] && ! (PrimeQ[Prime[n]*(Prime[n] - k) - 1] && PrimeQ[Prime[n]*(Prime[n] - k) + 1]), k++]; If[k == Prime[n], k = -1]; k, {n, 100}]