login
A092198
Equal count of primes congruent to 1 mod 4 and 3 mod 4 associated with primes in A007351 (the zero beginning the sequence indicates the prime 2).
0
0, 1, 3, 6, 44, 1471, 1472, 1473, 1474, 1475, 1476, 25185, 25187, 25188, 25189, 25190, 25196, 25206, 25211, 25212, 25213, 25214, 25215, 25216, 25217, 25218, 25219, 25222, 25224, 25225, 25251, 25253, 25257, 25258, 25410, 25421, 25426, 25427
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
Cf. A007351.
Sequence in context: A363475 A001886 A153742 * A133005 A009581 A088674
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Feb 24 2004
EXTENSIONS
Typo in data corrected by Sean Reeves, Mar 24 2018
STATUS
approved