login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A159477 a(n) = smallest prime >= n, if 1 is counted as a prime. 2
1, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..1000

FORMULA

For n >= 2, a(n) = A007918(n). a(p) = p, a(c) = a(c+1), for p = primes (A000040), c = composite numbers (A002808).

MATHEMATICA

Join[{1}, NextPrime[Range[60]]] (* Harvey P. Dale, Jan 04 2012 *)

PROG

(Haskell)

a159477 n = a159477_list !! (n-1)

a159477_list = 1 : concat

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

            a008578_list $ tail a008578_list)

-- Reinhard Zumkeller, Nov 09 2011

CROSSREFS

Cf. A007918, A000040, A002808.

Cf. A008578.

Sequence in context: A082048 A113459 A305430 * A268101 A123318 A186698

Adjacent sequences:  A159474 A159475 A159476 * A159478 A159479 A159480

KEYWORD

nonn

AUTHOR

Jaroslav Krizek, Apr 13 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 05:47 EDT 2019. Contains 327287 sequences. (Running on oeis4.)