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.

A098016 Indices x such that (1/4)(prime(x+1) + prime(x)) is prime.

Original entry on oeis.org

2, 3, 9, 11, 23, 32, 54, 58, 67, 76, 86, 103, 164, 188, 200, 202, 208, 210, 243, 311, 351, 354, 374, 414, 420, 427, 441, 468, 515, 539, 559, 588, 621, 639, 650, 652, 662, 670, 693, 708, 748, 752, 769, 811, 816, 823, 842, 883, 889, 939, 943, 963, 970, 1006, 1009
Offset: 1

Views

Author

Cino Hilliard, Sep 09 2004

Keywords

Comments

Conjecture: (1/2)(prime(x+1) + prime(x)) is not prime for all x.
This is obvious: (prime(x+1)+prime(x))/2 is strictly between prime(x) and prime(x+1), so if it were prime, prime(x+1) wouldn't be the next prime after prime(x). - Robert Israel, Feb 04 2019

Examples

			Prime(2+1) + prime(2) = 5+3 = 8. 1/4(8) = 2. 2 is the first entry.
		

Crossrefs

Programs

  • Maple
    filter:= proc(t) local v; v:= (ithprime(t)+ithprime(t+1))/4; v::integer and isprime(v) end proc:
    select(filter, [$1..2000]); # Robert Israel, Feb 04 2019
  • Mathematica
    Transpose[Select[Table[{i,Prime[i],Prime[i+1]}, {i,1200}], PrimeQ[Total[Rest[#]]/4]&]][[1]](* Harvey P. Dale, Mar 24 2011 *)
    Position[Partition[Prime[Range[1100]],2,1],?(PrimeQ[Total[#]/4]&)]//Flatten (* _Harvey P. Dale, Sep 11 2022 *)
  • PARI
    f(n) = for(x=1,n,y=prime(x+1)+prime(x);if(y%4==0 && isprime(y\4),print1(x",")))

Formula

a(n) = A000720(2*A118134(n)-1). - Robert Israel, Feb 04 2019