A368277 Prime numbers that have an even number of monotone Bacher representations (A368276).
5, 7, 13, 17, 23, 43, 53, 59, 61, 71, 79, 83, 107, 109, 113, 127, 131, 137, 139, 167, 181, 191, 193, 199, 211, 223, 227, 239, 241, 257, 271, 277, 293, 307, 313, 317, 331, 337, 347, 353, 359, 367, 379, 389, 401, 421, 431, 439, 449, 457, 461, 467, 479, 499
Offset: 1
Keywords
Examples
For n = 13, the 4 solutions are (w, x, y, z) = (0, 0, 1, 13), (1, 1, 2, 6), (1, 1, 3, 4), (2, 2, 3, 3).
Links
- Roland Bacher, A quixotic proof of Fermat's two squares theorem for prime numbers, American Mathematical Monthly, Vol. 130, No. 9 (November 2023), 824-836; arXiv version, arXiv:2210.07657 [math.NT], 2022.
Programs
-
Julia
using Nemo println([n for n in 1:500 if iseven(A368276(n)) && is_prime(n)])
-
Mathematica
t[n_]:=t[n]=Select[Divisors[n],#^2<=n&]; A368276[n_]:=Total[t[n]]+Sum[Boole[wx
A368276[#]]&] (* Paolo Xausa, Jan 02 2024 *) -
Python
from itertools import takewhile, islice from sympy import nextprime, divisors def A368277_gen(startvalue=2): # generator of terms >= startvalue p = max(nextprime(startvalue-1),2) while True: c = sum(takewhile(lambda x:x**2<=p,divisors(p))) &1 for wx in range(1,(p>>1)+1): for d1 in divisors(wx): if d1**2 > wx: break m = p-wx c = c+sum(1 for d in takewhile(lambda x:x**2<=m,divisors(m)) if wx
A368277_list = list(islice(A368277_gen(),30)) # Chai Wah Wu, Dec 19 2023
Comments