A098016 Indices x such that (1/4)(prime(x+1) + prime(x)) is prime.
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
Examples
Prime(2+1) + prime(2) = 5+3 = 8. 1/4(8) = 2. 2 is the first entry.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
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",")))
Comments