A368581 The sum of weights of nondegenerated monotone Bacher representations of n.
0, 0, 0, 0, 1, 0, 2, 0, 2, 1, 4, 0, 5, 4, 2, 4, 7, 2, 8, 5, 4, 10, 10, 2, 9, 13, 8, 8, 13, 8, 14, 10, 12, 19, 10, 8, 17, 22, 16, 9, 19, 18, 20, 20, 11, 28, 22, 16, 20, 21, 24, 27, 25, 26, 16, 24, 28, 37, 28, 16, 29, 40, 24, 34, 22, 34, 32, 41, 36, 28, 34, 28
Offset: 1
Keywords
Examples
See the example in A368580.
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 function A368581(n::Int) t(n) = (d for d in divisors(n) if d * d <= n) c(y, w, wx) = max(1, 2 * (Int(w * w < wx) + Int(y * y < n - wx))) sum(sum(sum(c(y, w, wx) for y in t(n - wx) if wx < y * w; init=0) for w in t(wx)) for wx in 1:div(n, 2); init=0) end println([A368581(n) for n in 1:72])
-
Mathematica
t[n_]:=t[n]=Select[Divisors[n],#^2<=n&]; A368581[n_]:=Sum[If[wx
A368581,100] (* Paolo Xausa, Jan 02 2024 *)
Formula
a(n) = Sum_{k in K} Sum_{w in W} Sum_{y in Y} max(1, 2*([w^2 < k] + [y^2 < n - k])), where the square brackets denote Iverson brackets and k in K <=> 1 <= k <= floor(n/2), w in W <=> w|k and w^2 <= k, and y in Y <=> y|n-k and y^2 <= n-k and k < y*w. (See the Julia implementation.)
a(p) = (p + 1) / 2 - 2 for all odd prime p.
Comments