A096453 Primes p such that the number of primes q, 5 <= q < p, congruent to 1 mod 3, is two less than the number of such primes congruent to 2 mod 3.
31, 59, 67, 73, 97, 103, 109, 127, 137, 149, 157, 179, 191, 197, 211, 241, 257, 347, 353, 379, 389, 401, 419, 431, 439, 449, 461, 467, 761, 773, 797, 1787, 1801, 1823, 1847, 1867, 1873, 1879, 1901, 3761, 9203, 198479, 198593, 608981812531, 608981812651, 608981812697
Offset: 1
Keywords
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1000
Programs
-
Maple
ct := -2: q:=2: for n from 2 to 20000 do p:=q: q:=ithprime(n): ct:=ct+`if`(p mod 3 = 1, -1, 1): if(ct=2)then printf("%d, ", q): fi: od: # Nathaniel Johnston, Jun 16 2011
-
Mathematica
npc1Q[n_]:=Module[{tot=PrimePi[n]-3,c},c=Count[Prime[Range[3,tot+2]],?(Mod[ #,3]==1&)];c==tot/2-1]; Select[Prime[Range[18000]],npc1Q] (* _Harvey P. Dale, Aug 22 2013 *)
-
PARI
lista(limit=10^6)={my(c=2); forprime(p=5, limit, if(!c, print1(p, ", ")); if(p%3==1, c++, c--))} \\ Andrew Howroyd, Aug 09 2025
Extensions
More terms and better definition from Joshua Zucker, May 21 2006
a(44) onwards from Andrew Howroyd, Aug 09 2025