A126554 Arithmetic mean of two consecutive balanced primes (of order one).
29, 105, 165, 192, 234, 260, 318, 468, 578, 600, 630, 693, 840, 962, 1040, 1113, 1155, 1205, 1295, 1439, 1629, 1750, 1830, 2097, 2352, 2547, 2790, 2933, 3135, 3310, 3475, 3685, 3873, 4211, 4433, 4527, 4627, 4674, 4842, 5050, 5110, 5208, 5345, 5390, 5478
Offset: 1
Keywords
Links
- Muniru A Asiru and Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..5000 from Muniru A Asiru)
Programs
-
GAP
P:=Filtered([1..6000],IsPrime);;P1:=List(Filtered(List([0..Length(P)-3],k->List([1..3],j->P[j+k])),i->Sum(i)/3=i[2]),m->m[2]);; a:=List([1..Length(P1)-1],n->(P1[n+1]+P1[n])/2); # Muniru A Asiru, Mar 31 2018
-
Mathematica
b = {}; a = {}; Do[If[PrimeQ[((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2], AppendTo[a, ((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2]], {n, 1, 1000}]; Do[AppendTo[b, (a[[k + 1]] + a[[k]])/2], {k, 1, Length[a] - 1}]; b
-
PARI
{m=6000;a=0;p=2;q=3;r=5;while(r<=m,if((p+r)/2==q,if(a>0,print1((a+q)/2,","));a=q);p=q;q=r;r=nextprime(r+1))} \\ Klaus Brockhaus, Jan 05 2007
Extensions
Edited by Klaus Brockhaus, Jan 05 2007
Comments