A007917 Version 1 of the "previous prime" function: largest prime <= n.
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: 2
References
- K. Atanassov, On the 37th and the 38th Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 2, 83-85.
- J. Castillo, Other Smarandache Type Functions: Inferior/Superior Smarandache f-part of x, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 202-204.
Links
- N. J. A. Sloane, Table of n, a(n) for n = 2..10000
- Marc Deleglise and Jean-Louis Nicolas, Maximal product of primes whose sum is bounded, arXiv preprint arXiv:1207.0603 [math.NT], 2012. See Fig. 1. - From _N. J. A. Sloane_, Dec 17 2012
- Hans Gunter, Puzzle 145. The Inferior Smarandache Prime Part and Superior Smarandache Prime Part functions; Solutions by Jean Marie Charrier, Teresinha DaCosta, Rene Blanch, Richard Kelley and Jim Howell. F. Smarandache, Only Problems, Not Solutions!.
- Eric Weisstein's World of Mathematics, Previous Prime
Crossrefs
Programs
-
Haskell
a007917 n = if a010051' n == 1 then n else a007917 (n-1) -- Reinhard Zumkeller, May 01 2013, Jul 26 2012
-
Magma
[NthPrime(#PrimesUpTo(n)): n in [2..100]]; // Vincenzo Librandi, Nov 25 2015
-
Maple
A007917 := n-> prevprime(n+1);
-
Mathematica
Table[Prime[PrimePi[n]], {n, 2, 70}] (* Stefan Steinerberger, Apr 06 2006 *) NextPrime[Range[3,80],-1] (* Harvey P. Dale, Jan 23 2011 *)
-
PARI
a=precprime \\ In older versions, use a(n)=precprime(n) \\ Charles R Greathouse IV, Jun 15 2011
Formula
From Wesley Ivan Hurt, May 22 2013: (Start)
omega( Product_{i=2..n} a(i) ) = pi(n).
Omega( Product_{i=2..n} a(i) ) = n - 1. (End)
a(n) = n + 1 - Sum_{i=1..n} floor(pi(i)/pi(n)) = n + 1 - A175851(n). - Ridouane Oudra, Jun 24 2024
Conjecture: a(n) = floor(log(Sum_{k=2..n} exp(A000010(k)+1))). - Joseph M. Shunia, Aug 09 2024
Extensions
Edited by N. J. A. Sloane, Apr 06 2008
Comments