OFFSET
1,3
FORMULA
Compute the running totals of primes congruent to 1 mod 4 and primes congruent to 3 mod 4. When these totals are equal, include in the sequence.
EXAMPLE
a(3)=3 because at this point there are 3 primes congruent to 1 mod 4: 5, 13, 17 and 3 primes congruent to 3 mod 4: 3, 7, 11.
MATHEMATICA
Block[{a = 0, b = -1}, Reap[Do[If[Mod[p, 4] == 1, a++, b++]; If[a == b, Sow@ a, 0], {p, Prime@ Range[51000]}]][[-1, -1]]] (* Michael De Vlieger, Mar 26 2018 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Feb 24 2004
EXTENSIONS
Typo in data corrected by Sean Reeves, Mar 24 2018
STATUS
approved