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.

A066875 Numbers k such that prime(k+1) + prime(k-1) = 2*prime(k).

Original entry on oeis.org

3, 16, 37, 40, 47, 55, 56, 74, 103, 108, 111, 119, 130, 161, 165, 185, 188, 195, 200, 219, 240, 272, 273, 292, 340, 359, 388, 420, 427, 465, 466, 509, 521, 554, 600, 606, 622, 630, 634, 668, 683, 684, 703, 710, 711, 734, 762, 792, 814, 822, 823, 830, 831, 883
Offset: 1

Views

Author

Benoit Cloitre, Jan 21 2002

Keywords

Comments

The indices of primes that are equidistant from the two primes surrounding them. - Harvey P. Dale, May 16 2013
Indices of balanced primes (A006562). - Zak Seidov, Mar 03 2019

Crossrefs

Cf. A000720 (primepi), A006562 (balanced primes).

Programs

  • Magma
    [n: n in [2..1000] | 2*NthPrime(n) eq (NthPrime(n-1) + NthPrime(n+1))]; // Vincenzo Librandi, Apr 09 2015
  • Mathematica
    Select[Range[2, 1000], Prime[ # ] == (Prime[ # + 1] + Prime[ # - 1])/2 &] (* Ray Chandler, Jan 09 2007 *)
    PrimePi/@Transpose[Select[Partition[Prime[Range[900]],3,1],Length[ Union[ Differences[ #]]]==1&]][[2]] (* Harvey P. Dale, May 16 2013 *)
  • PARI
    isok(k) = { k > 1 && prime(k+1) + prime(k-1) == 2*prime(k) } \\ Harry J. Smith, Apr 03 2010
    

Formula

a(n) = primepi(A006562(n)) = A000720(A006562(n)).

Extensions

Corrected by Ray Chandler, Jan 09 2007