OFFSET
1,1
COMMENTS
prime(n) where 2*prime(n) - prime(n-1) is prime. - Robert Israel, Dec 01 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..11000
MAPLE
Primes:= select(isprime, [2, seq(i, i=1..10^4, 2)]):
Primes[select(i -> isprime(2*Primes[i]-Primes[i-1]), [$2..nops(Primes)])]; # Robert Israel, Dec 01 2015
MATHEMATICA
p = q = 2; lst = {}; Do[q = Prime@n; If[PrimeQ[2q - p], AppendTo[lst, q]]; p = q, {n, 2, 400}]; lst (* Robert G. Wilson v, Mar 22 2007 *)
PROG
(PARI) lista(nn) = {forprime(p=5, nn, if (isprime(2*p-precprime(p-1)), print1(p, ", ")); ); } \\ Michel Marcus, Dec 01 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 31 2002; revised Jul 16 2003
EXTENSIONS
Thanks to Sven Simon for noticing errors in the original version.
STATUS
approved