OFFSET
1,1
COMMENTS
Primes prime(n) such that A112632(n-1) = 3. In other words, p >= 5 such that A321856(prevprime(p)) = 3. - Jianing Song, Jan 06 2026
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Yasutoshi Kohmoto, Aug 12 2004
EXTENSIONS
More terms and better definition from Joshua Zucker, May 21 2006
a(44) onwards from Andrew Howroyd, Aug 09 2025
STATUS
approved
