|
|
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.
|
|
0
|
|
|
2, 13, 41, 61, 67, 79, 109, 131, 137, 173, 179, 181, 191, 193, 211, 223, 227, 229, 233, 239, 241, 251, 587, 613, 617, 641, 653, 659, 661, 719, 727, 733, 761, 769, 829, 953, 967, 971, 1009, 1021, 1039, 1069, 1087, 1193, 1201, 1213, 1697, 1721, 1753, 1759, 1777, 1783, 1787
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|