OFFSET
1,2
COMMENTS
From Rémi Guillaume, Nov 06 2024: (Start)
2n-1 has only odd divisors; so the sum of any two of them is even, i.e., halvable.
If 2n-1 = m^2, i.e., if n is a centered square (A001844), then the two "median divisors" coincide and their mean a(n) is m. (End)
FORMULA
EXAMPLE
From Michael De Vlieger, Nov 01 2024: (Start)
Let N = 2*n-1, let factor d <= sqrt(N) be the largest such, and let D = N/d.
For n = 2, N = 2*2-1 = 3, d = 1, D = 3, so a(2) = (1+3)/2 = 2.
For n = 5, N = 2*5-1 = 9 is a perfect square and d = D = 3, so a(5) = (3+3)/2 = 3.
For n = 8, N = 2*8-1 = 15, d = 3, D = 5, so a(8) = (3+5)/2 = 4, etc. (End)
MATHEMATICA
{1}~Join~Table[N = 2*n + 1; (# + N/#)/2 &@ #[[Floor[Length[#]/2] ]] &@ Divisors[N], {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,changed
AUTHOR
Charles Kusniec, Oct 30 2024
STATUS
approved