login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007917 Version 1 of the "previous prime" function: largest prime <= n. 115

%I #99 Sep 08 2022 08:44:35

%S 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,

%T 23,29,29,31,31,31,31,31,31,37,37,37,37,41,41,43,43,43,43,47,47,47,47,

%U 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

%N Version 1 of the "previous prime" function: largest prime <= n.

%C Version 2 of the "previous prime" function (see A151799) is "largest prime < n". This produces the same sequence of numerical values, except the offset (or indexing) starts at 3 instead of 2.

%C Maple's "prevprime" function uses version 2.

%C Also the largest prime dividing n! or lcm(1,...,n). - _Labos Elemer_, Jun 22 2000

%C Also largest prime among terms of (n+1)st row of Pascal's triangle. - _Jud McCranie_, Jan 17 2000

%C Also largest integer k such that A000203(k) <= n+1. - _Benoit Cloitre_, Mar 17 2002. - Corrected by _Antti Karttunen_, Nov 07 2017

%C Also largest prime factor of A061355(n) (denominator of Sum_{k=0..n} 1/k!). - _Jonathan Sondow_, Jan 09 2005

%C Also prime(pi(x)) where pi(x) is the prime counting function = number of primes <= x. - _Cino Hilliard_, May 03 2005

%C Also largest prime factor, occurring to the power p, in denominator of Sum_{k=1..n} 1/k^p, for any positive integer p. - _M. F. Hasler_, Nov 10 2006

%C For n > 10, these values are close to the most negative eigenvalues of A191898 (conjecture). - _Mats Granvik_, Nov 04 2011

%D 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.

%D 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.

%H N. J. A. Sloane, <a href="/A007917/b007917.txt">Table of n, a(n) for n = 2..10000</a>

%H Marc Deleglise and Jean-Louis Nicolas, <a href="http://arxiv.org/abs/1207.0603">Maximal product of primes whose sum is bounded</a>, arXiv preprint arXiv:1207.0603 [math.NT], 2012. See Fig. 1. - From _N. J. A. Sloane_, Dec 17 2012

%H Hans Gunter, <a href="http://primepuzzles.net/puzzles/puzz_145.htm">Puzzle 145. The Inferior Smarandache Prime Part and Superior Smarandache Prime Part functions</a>; Solutions by Jean Marie Charrier, Teresinha DaCosta, Rene Blanch, Richard Kelley and Jim Howell. F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PreviousPrime.html">Previous Prime</a>

%F Equals A006530(A000142(n)). - _Jonathan Sondow_, Jan 09 2005

%F Equals A006530(A056040(n)). - _Peter Luschny_, Mar 04 2011

%F a(n) = A000040(A049084(A007918(n)) + 1 - A010051(n)). - _Reinhard Zumkeller_, Jul 26 2012

%F From _Wesley Ivan Hurt_, May 22 2013: (Start)

%F omega( Product_{i=2..n} a(i) ) = pi(n).

%F Omega( Product_{i=2..n} a(i) ) = n - 1. (End)

%F For n >= 2, a(A000203(n)) = A070801(n). - _Antti Karttunen_, Nov 07 2017

%p A007917 := n-> prevprime(n+1);

%t Table[Prime[PrimePi[n]], {n, 2, 70}] (* _Stefan Steinerberger_, Apr 06 2006 *)

%t NextPrime[Range[3,80],-1] (* _Harvey P. Dale_, Jan 23 2011 *)

%o (PARI) a=precprime \\ In older versions, use a(n)=precprime(n)

%o \\ _Charles R Greathouse IV_, Jun 15 2011

%o (Haskell)

%o a007917 n = if a010051' n == 1 then n else a007917 (n-1)

%o -- _Reinhard Zumkeller_, May 01 2013, Jul 26 2012

%o (Magma) [NthPrime(#PrimesUpTo(n)): n in [2..100]]; // _Vincenzo Librandi_, Nov 25 2015

%Y Cf. A000040, A000203, A005145, A007918, A070801, A113523, A151799, A179278.

%K nonn,easy,nice

%O 2,1

%A R. Muller

%E Edited by _N. J. A. Sloane_, Apr 06 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)