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.

A368581 The sum of weights of nondegenerated monotone Bacher representations of n.

This page as a plain text file.
%I A368581 #14 Jan 02 2024 06:07:17
%S A368581 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,
%T A368581 10,12,19,10,8,17,22,16,9,19,18,20,20,11,28,22,16,20,21,24,27,25,26,
%U A368581 16,24,28,37,28,16,29,40,24,34,22,34,32,41,36,28,34,28
%N A368581 The sum of weights of nondegenerated monotone Bacher representations of n.
%C A368581 For the definition of 'Bacher representation' and related notions, see the comments in A368580.
%H A368581 Roland Bacher, <a href="https://doi.org/10.1080/00029890.2023.2242034">A quixotic proof of Fermat's two squares theorem for prime numbers</a>, American Mathematical Monthly, Vol. 130, No. 9 (November 2023), 824-836; <a href="https://arxiv.org/abs/2210.07657">arXiv version</a>, arXiv:2210.07657 [math.NT], 2022.
%F A368581 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.)
%F A368581 a(n) + A368580(n) = A368207(n).
%F A368581 a(p) = (p + 1) / 2 - 2 for all odd prime p.
%e A368581 See the example in A368580.
%t A368581 t[n_]:=t[n]=Select[Divisors[n],#^2<=n&];
%t A368581 A368581[n_]:=Sum[If[wx<y*w,Max[1,2(Boole[w^2<wx]+Boole[y^2<n-wx])],0],{wx,Floor[n/2]},{w,t[wx]},{y,t[n-wx]}];
%t A368581 Array[A368581,100] (* _Paolo Xausa_, Jan 02 2024 *)
%o A368581 (Julia)
%o A368581 using Nemo
%o A368581 function A368581(n::Int)
%o A368581     t(n) = (d for d in divisors(n) if d * d <= n)
%o A368581     c(y, w, wx) = max(1, 2 * (Int(w * w < wx) + Int(y * y < n - wx)))
%o A368581     sum(sum(sum(c(y, w, wx) for y in t(n - wx) if wx < y * w; init=0)
%o A368581     for w in t(wx)) for wx in 1:div(n, 2); init=0)
%o A368581 end
%o A368581 println([A368581(n) for n in 1:72])
%Y A368581 Cf. A368207, A368276, A368580.
%K A368581 nonn
%O A368581 1,7
%A A368581 _Peter Luschny_, Dec 31 2023