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.

A031170 a(n) = prime(n+8) - prime(n).

Original entry on oeis.org

21, 26, 26, 30, 30, 30, 30, 34, 36, 32, 36, 34, 32, 36, 36, 36, 38, 40, 36, 36, 36, 34, 44, 42, 40, 38, 46, 44, 48, 50, 40, 42, 42, 42, 42, 42, 40, 36, 44, 50, 48, 48, 42, 46, 44, 52, 46, 40, 42, 42, 44, 42, 42, 42, 50, 48, 44, 46, 54, 56, 64, 56, 46, 48, 54, 56, 48
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a031170 n = a031170_list !! (n-1)
    a031170_list = zipWith (-) (drop 8 a000040_list) a000040_list
    -- Reinhard Zumkeller, Aug 23 2015
  • Magma
    [NthPrime(n+8)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    ithprime(n+8)-ithprime(n);
  • Mathematica
    Table[Prime[n+8]-Prime[n],{n,1,100}]  (* Harvey P. Dale, Mar 23 2011 *)

Formula

a(n) = A000040(n+8) - A000040(n). - Zak Seidov, Mar 23 2011