cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A031167 a(n) = prime(n+5) - prime(n).

Original entry on oeis.org

11, 14, 14, 16, 18, 18, 20, 22, 20, 18, 22, 22, 20, 24, 24, 20, 20, 22, 22, 26, 28, 24, 24, 20, 16, 26, 28, 30, 30, 36, 24, 26, 26, 28, 24, 28, 24, 28, 26, 24, 20, 30, 32, 34, 32, 34, 28, 18, 24, 28, 30, 30, 30, 26, 24, 20, 24, 36, 34, 32, 34, 38, 30, 36, 36, 36, 28
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a031167 n = a031167_list !! (n-1)
    a031167_list = zipWith (-) (drop 5 a000040_list) a000040_list
    -- Reinhard Zumkeller, Aug 23 2015
  • Magma
    [NthPrime(n+5)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • 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 *)
  • PARI
    A031167(n) = prime(n+5)-prime(n)
    

Extensions

Initial term added by Michael B. Porter, Jan 27 2010