cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A361071 Let c1(p) be the number of primes <= p with an odd number of 1's in base 2, and let c2(p) be the number of primes <= p with an even number of 1's in base 2. a(n) is the least prime p such that abs(c1(p) - c2(p)) >= n.

This page as a plain text file.
%I A361071 #17 Apr 07 2023 09:26:29
%S A361071 2,13,41,61,67,79,109,131,137,173,179,181,191,193,211,223,227,229,233,
%T A361071 239,241,251,587,613,617,641,653,659,661,719,727,733,761,769,829,953,
%U A361071 967,971,1009,1021,1039,1069,1087,1193,1201,1213,1697,1721,1753,1759,1777,1783,1787
%N A361071 Let c1(p) be the number of primes <= p with an odd number of 1's in base 2, and let c2(p) be the number of primes <= p with an even number of 1's in base 2. a(n) is the least prime p such that abs(c1(p) - c2(p)) >= n.
%e A361071 a(1) = 2, because c1(2) = 1 and c2(2) = 0, so abs(c1(2) - c2(2)) = 1 >= 1, and no lesser prime satisfies this.
%o A361071 (PARI) { r = 0; n = 1; forprime (p = 2, 1787, r += (-1)^hammingweight(p); if (n==abs(r), print1 (p", "); n++;);); } \\ _Rémy Sigrist_, Mar 01 2023
%Y A361071 Cf. A130911, A027697, A027699.
%K A361071 nonn,base
%O A361071 1,1
%A A361071 _Jean-Marc Rebert_, Mar 01 2023