A109566 prime(k) for those k where floor((2*(prime(k+1)-prime(k))*PrimePi(k) mod (8*k))/k) = m with m = 12.
16141, 36389, 37907, 69263, 73189, 86629, 95651, 103237, 112691, 126859, 130873, 132763, 152311, 153763, 159233, 166487, 167809, 171947, 200513, 202129, 212297, 213659, 223151, 223849, 227893, 236813, 250199, 255259, 261169, 277099, 277429, 283211, 293543, 302053
Offset: 1
Programs
-
Mathematica
a = Flatten[Table[If[Floor[2*Mod[(Prime[n + 1] - Prime[n])*PrimePi[n]/n, 8]] == 12, Prime[n], {}], {n, 1, 10000}]] Table[If[Floor[2*Mod[(Prime[n+1]-Prime[n])*PrimePi[n]/n,8]]==12,Prime[n],Nothing],{n,10000}] (* Harvey P. Dale, Dec 16 2024 *)
Extensions
Name edited, offset corrected and more terms added by Amiram Eldar, Jun 02 2025