OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MAPLE
seq(ithprime(n+5)-ithprime(n), n=1..30);
MATHEMATICA
a=5; t=Array[Prime, 123]; Drop[t, a]-Drop[t, -a] (* Vladimir Joseph Stephan Orlovsky, Aug 13 2009 *)
Last[#]-First[#]&/@Partition[Prime[Range[80]], 6, 1] (* Harvey P. Dale, Jul 11 2014 *)
PROG
(PARI) A031167(n) = prime(n+5)-prime(n)
(Magma) [NthPrime(n+5)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
(Haskell)
a031167 n = a031167_list !! (n-1)
a031167_list = zipWith (-) (drop 5 a000040_list) a000040_list
-- Reinhard Zumkeller, Aug 23 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Initial term added by Michael B. Porter, Jan 27 2010
STATUS
approved