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.

A151799 Version 2 of the "previous prime" function: largest prime < n.

Original entry on oeis.org

2, 3, 3, 5, 5, 7, 7, 7, 7, 11, 11, 13, 13, 13, 13, 17, 17, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 29, 29, 31, 31, 31, 31, 31, 31, 37, 37, 37, 37, 41, 41, 43, 43, 43, 43, 47, 47, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 61, 61, 61, 61, 61, 61, 67, 67, 67, 67, 71, 71, 73, 73, 73, 73
Offset: 3

Views

Author

N. J. A. Sloane, Jun 29 2009

Keywords

Comments

Version 1 of the "previous prime" function is "largest prime <= n". This produces A007917, the same sequence of numerical values, except the offset (or indexing) starts at 2 instead of 3.
Maple's "prevprime" function uses version 2.
See A007917 for references and further information.

Crossrefs

Programs

Formula

a(n) = A000040(A000720(n-1)). - Enrique Pérez Herrero, Jul 23 2011
a(n) = n + 1 - Sum_{k=1..n}( floor(k!^(n-1)/(n-1)!)-floor((k!^(n-1)-1)/(n-1)!) ). - Anthony Browne, May 17 2016
a(n) = A060265(floor(n/2)) for n >= 4. - Georg Fischer, Nov 29 2022