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!)
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
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. A008578.
Sequence in context: A082048 A113459 A305430 * A268101 A123318 A186698
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 11:10 EDT 2024. Contains 372019 sequences. (Running on oeis4.)