OFFSET
1,2
COMMENTS
Numbers n with property that 2*prime(n)-prime(n+1) = 2*prime(n+1)-prime(n+2), or 2*prime(n)+prime(n+2) = 3*prime(n+1).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
Primes:= select(isprime, [2, (2*i+1 $ i=1..10^4)]):
Gaps:= Primes[2..-1] - Primes[1..-2]:
G2:= Gaps[2..-1] - 2*Gaps[1..-2]:
ListTools:-SearchAll(0, G2); # Robert Israel, May 22 2015
MATHEMATICA
Select[Range@ 600, 2 Prime[#] - Prime[# + 1] == 2 Prime[# + 1] - Prime[# + 2] &] (* Michael De Vlieger, May 11 2015 *)
PROG
(Magma) [n: n in [0..600] | 2*NthPrime(n)-NthPrime(n+1) eq 2*NthPrime(n+1)-NthPrime(n+2)]; // Vincenzo Librandi, May 12 2015
(Haskell)
a257762 n = a257762_list !! (n-1)
a257762_list = map a258432 $ filter ((== 2) . a258383) [1..]
-- Reinhard Zumkeller, May 31 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, May 07 2015
STATUS
approved