Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 4500 articles have referenced us, often saying "we would not have discovered this result without the OEIS".
Table of n, a(n) for n=1..72.
For n = prime 7, nextprime(7+1) = 11 = a(7).
(PARI) f(n) = for(x=1, n, if(isprime(x), y=nextprime(x+1), y=x); print1(y", "))
Sequence in context: A107431 A189827 A023859 * A082568 A242640 A210195
Adjacent sequences: A096454 A096455 A096456 * A096458 A096459 A096460
Cino Hilliard, Aug 11 2004