Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Feb 24 2019 14:44:07
%S 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,
%T 101,103,107,29,113,31,131,137,139,149,151,37,163,167,173,41,181,43,
%U 193,197,199,47,223,227,229,233,239,53,251,257,263,269,271,59,281,61,293
%N If n is prime then a(n) = n, else a(n) = prime(n).
%H Zak Seidov, <a href="/A068519/b068519.txt">Table of n, a(n) for n = 1..1000</a>
%e a(1) = 2 because 1 is not prime, hence a(1) = prime(1) = 2.
%e a(2) = 2 because 2 is prime.
%p seq(`if`(isprime(i), i, ithprime(i)), i=1..100);
%t Table[If[PrimeQ[n],n,Prime[n]],{n,1,200}] (* _Zak Seidov_, Nov 04 2009 *)
%K nonn,easy
%O 1,1
%A Francois Jooste (phukraut(AT)hotmail.com), Mar 18 2002
%E More terms, b-file and Mathematica code from _Zak Seidov_, Nov 04 2009