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!)
A068519 If n is prime then a(n) = n, else a(n) = prime(n). 7
2, 2, 3, 7, 5, 13, 7, 19, 23, 29, 11, 37, 13, 43, 47, 53, 17, 61, 19, 71, 73, 79, 23, 89, 97, 101, 103, 107, 29, 113, 31, 131, 137, 139, 149, 151, 37, 163, 167, 173, 41, 181, 43, 193, 197, 199, 47, 223, 227, 229, 233, 239, 53, 251, 257, 263, 269, 271, 59, 281, 61, 293 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 2 because 1 is not prime, hence a(1) = prime(1) = 2.
a(2) = 2 because 2 is prime.
MAPLE
seq(`if`(isprime(i), i, ithprime(i)), i=1..100);
MATHEMATICA
Table[If[PrimeQ[n], n, Prime[n]], {n, 1, 200}] (* Zak Seidov, Nov 04 2009 *)
CROSSREFS
Sequence in context: A354377 A051301 A002583 * A342848 A339826 A108041
KEYWORD
nonn,easy
AUTHOR
Francois Jooste (phukraut(AT)hotmail.com), Mar 18 2002
EXTENSIONS
More terms, b-file and Mathematica code from Zak Seidov, Nov 04 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 March 1 04:50 EST 2024. Contains 370430 sequences. (Running on oeis4.)