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.

A031172 a(n) = prime(n+10) - prime(n).

Original entry on oeis.org

29, 34, 36, 36, 36, 40, 42, 42, 44, 42, 42, 42, 42, 46, 50, 48, 44, 46, 42, 42, 54, 52, 54, 50, 52, 50, 54, 56, 58, 60, 52, 50, 54, 54, 48, 48, 54, 60, 60, 56, 54, 58, 50, 58, 60, 64, 58, 48, 50, 52, 50, 54, 66, 60, 56, 54, 62, 66, 70, 68, 70, 66, 60, 62, 66, 66, 58
Offset: 1

Views

Author

Keywords

Comments

In principle, moderate values should appear infinitely many times, by analogy with twin primes hypothesis. For example, a(n) = 44 for n = 9, 17, 206, 1604467, 12905293, 18008874, 26545460, 32655424, 57848470, 58313630, 59022635, 66275281, 81581956, 123780499, 160884754, 167797255, 179786560, 181569324, 239542290, ... - Zak Seidov, Sep 14 2014, edited by M. F. Hasler, Dec 03 2018
According to the k-tuple conjecture, any admissible k-tuple of primes occurs with calculable nonzero asymptotic density, i.e., in particular, infinitely many times. For k = 11, number of primes in the interval [prime(n), prime(n+10)], the smallest possible diameter of a k-tuple is A008407(11) = 36, and there are A083409(11) = 2 such constellations: {0, 4, 6, 10, 16, 18, 24, 28, 30, 34, 36}, first occurring at A213646(1) = 1418575498573, and {0, 2, 6, 8, 12, 18, 20, 26, 30, 32, 36}, first occurring at A213647(1) = 11. The combined list { prime(n) | a(n) = 36 } is A257129. - M. F. Hasler, Dec 03 2018

Crossrefs

Programs

  • GAP
    P:=Filtered([1..400],IsPrime);; a:=List([1..Length(P)-10],n->P[n+10]-P[n]); # Muniru A Asiru, Dec 06 2018
  • Haskell
    a031172_list = zipWith (-) (drop 10 a000040_list) a000040_list
    a031172 n = a031172_list !! (n-1)  -- Reinhard Zumkeller, Aug 23 2015
    
  • Magma
    [NthPrime(n+10)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    A031172:=n->ithprime(n+10)-ithprime(n): seq(A031172(n), n=1..50);
  • Mathematica
    Table[Prime[n + 10] - Prime[n], {n, 50}] (* Wesley Ivan Hurt, Sep 14 2014 *)
  • PARI
    A031172(n)=prime(n+10)-prime(n) \\ M. F. Hasler, Dec 03 2018
    
  • Python
    from sympy import prime
    for n in range(1,100): print(prime(n+10)-prime(n)) # Stefano Spezia, Dec 06 2018
    
  • Sage
    [(nth_prime(n+10) - nth_prime(n)) for n in (1..100)] # G. C. Greubel, Dec 04 2018
    

Formula

a(n) = A000040(n+10) - A000040(n). - Wesley Ivan Hurt, Sep 14 2014

Extensions

Offset changed from 2 to 1; added a(1)=29 by Vincenzo Librandi, Apr 23 2011