OFFSET
1,2
COMMENTS
From Rémi Guillaume, Nov 26 2024 and Dec 05 2024: (Start)
2n-1 has only odd divisors; so the sum of any two of them is even.
a(n) and A219695(n) have opposite parity.
a(n) and n have the same parity.
a(n) = sqrt(2n-1) iff 2n-1 = (2j+1)^2 for some j >= 0, iff n is a centered square (A001844(j)); in this case, the two "median" divisors coincide with 2j+1, so their mean a(n) = 2j+1 and A219695(n) = 0.
More generally, with s a nonnegative integer:
If j >= s and n is the centered square A001844(j), then a(n-2s^2) <= 2j+1 and A219695(n-2s^2) <= 2s.
Basis of the proofs: 2(n-2s^2)-1 = (2j+1)^2-(2s)^2.
If j = s and n = A001844(j), then n-2s^2 = 2j+1 and 2(n-2s^2)-1 = 4j+1.
(End)
FORMULA
a(n) = A063655(2n-1)/2.
a(n) = sqrt((2n-1) + A219695(n)^2).
From Rémi Guillaume, Nov 21 2024: (Start)
a(n) = A361565(2n-1).
sqrt(2n-1) <= a(n) <= n.
EXAMPLE
From Michael De Vlieger, Nov 01 2024: (Start)
Let u = 2*n-1, let factor d <= sqrt(u) be the largest such, and let D = u/d.
For n = 2, u = 2*2-1 = 3, d = 1, D = 3, so a(2) = (1+3)/2 = 2.
For n = 5, u = 2*5-1 = 9 is a perfect square and d = D = 3, so a(5) = (3+3)/2 = 3.
For n = 8, u = 2*8-1 = 15, d = 3, D = 5, so a(8) = (3+5)/2 = 4, etc. (End)
MATHEMATICA
{1}~Join~Table[u = 2*n + 1; (# + u/#)/2 &@ #[[Floor[Length[#]/2] ]] &@ Divisors[u], {n, 2, 120}] (* Michael De Vlieger, Nov 01 2024 *)
PROG
(Python)
from sympy import divisors
def A377499(n): return (d:=(f:=divisors(m:=(n<<1)-1))[len(f)-1>>1])+m//d>>1 # Chai Wah Wu, Nov 07 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles Kusniec, Oct 30 2024
EXTENSIONS
New name from Rémi Guillaume, Feb 19 2025
STATUS
approved
