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.

A039731 a(n) = max{prime(n) mod q, where prime q < prime(n) = n-th prime}.

Original entry on oeis.org

1, 2, 2, 4, 6, 6, 8, 10, 12, 14, 18, 18, 20, 18, 24, 28, 30, 30, 34, 36, 38, 40, 42, 44, 48, 50, 48, 50, 54, 60, 64, 66, 68, 70, 72, 78, 80, 78, 84, 82, 84, 94, 96, 96, 98, 104, 110, 100, 102, 106, 112, 114, 124, 126, 126, 132, 134, 138, 132, 134, 144, 150
Offset: 2

Views

Author

Keywords

Comments

Sequence lists the maxima of rows of triangle A207409. - Michel Marcus, Oct 01 2013
If there is a prime q with p/2 < q < 2p/3, then p mod q = p - q and a(n) = p - nextprime(p/2). But by a result of Nagura, there is always a prime between x and 6x/5 for x > 25, so this holds for all p > 50 and (checking 2 <= n <= 15) for all n > 1. - Charles R Greathouse IV, Jul 12 2024

Crossrefs

Programs

Formula

a(n) = p - nextprime(p/2), where p is the n-th prime, see Greathouse comment. - Charles R Greathouse IV, Jul 12 2024