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!)
A007918 Least prime >= n (version 1 of the "next prime" function). 103
2, 2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71, 73, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Version 2 of the "next prime" function is "smallest prime > n". This produces A151800.

Maple uses version 2.

According to the "k-tuple" conjecture, a(n) is the initial term of the lexicographically earliest increasing arithmetic progression of n primes; the corresponding common differences are given by A061558. - David W. Wilson, Sep 22 2007

It is easy to show that the initial term of an increasing arithmetic progression of n primes cannot be smaller than a(n). - N. J. A. Sloane, Oct 18 2007

Also, smallest prime bounded by n and 2n inclusively (in accordance with Bertrand's theorem). Smallest prime >n is a(n+1) and is equivalent to smallest prime between n and 2n exclusively. - Lekraj Beedassy, Jan 01 2007

Run lengths of successive equal terms are given by A125266. - Felix Fröhlich, May 29 2022

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

Jens Kruse Andersen, Records for primes in arithmetic progressions

K. Atanassov, On Some of Smarandache's Problems

K. Atanassov, On the 37th and 38th Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 2, 83-85.

Henry Bottomley, Prime number calculator

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.

Andrew Granville, Prime Number Patterns

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.

Jonathan Sondow and Eric Weisstein, Bertrand's Postulate, World of Mathematics

Eric Weisstein's World of Mathematics, Next Prime, k-tuple conjecture

Index entries for sequences related to primes in arithmetic progressions

FORMULA

For n > 1: a(n) = A000040(A049084(A007917(n)) + 1 - A010051(n)). - Reinhard Zumkeller, Jul 26 2012

a(n) = A151800(n-1). - Seiichi Manyama, Apr 02 2018

MAPLE

A007918 := n-> nextprime(n-1); # M. F. Hasler, Apr 09 2008

MATHEMATICA

NextPrime[Range[-1, 72]] (* Jean-François Alcover, Apr 18 2011 *)

PROG

(PARI) A007918(n)=nextprime(n)  \\ M. F. Hasler, Jun 24 2011

(PARI) for(x=0, 100, print1(nextprime(x)", ")) \\ Cino Hilliard, Jan 15 2007

(Haskell)

a007918 n = a007918_list !! n

a007918_list = 2 : 2 : 2 : concat (zipWith

              (\p q -> (replicate (fromInteger(q - p)) q))

                                   a000040_list $ tail a000040_list)

-- Reinhard Zumkeller, Jul 26 2012

(Magma) [2] cat [NextPrime(n-1): n in [1..80]]; // Vincenzo Librandi, Jan 14 2016

(Python)

from sympy import nextprime

def A007918(n): return nextprime(n-1) # Chai Wah Wu, Apr 22 2022

CROSSREFS

Cf. A000040, A007917, A008407, A020497, A061558, A125266, A151799, A151800, A171400.

Sequence in context: A304683 A035658 A077018 * A278167 A239470 A320786

Adjacent sequences:  A007915 A007916 A007917 * A007919 A007920 A007921

KEYWORD

nonn,easy,nice

AUTHOR

R. Muller and Charles T. Le (charlestle(AT)yahoo.com)

STATUS

approved

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 October 7 08:31 EDT 2022. Contains 357270 sequences. (Running on oeis4.)