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.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Dec 31 2023

Keywords

Comments

For the definition of 'Bacher representation' and related notions, see the comments in A368580.

Examples

			See the example in A368580.
		

Crossrefs

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[wxA368581,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(n) + A368580(n) = A368207(n).
a(p) = (p + 1) / 2 - 2 for all odd prime p.