A377864 Largest divisor of 2n-1 less than or equal to sqrt(2n-1).
1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 5, 1, 7, 3, 1, 5, 3, 1, 1, 7, 5, 1, 3, 1, 1, 5, 7, 1, 9, 1, 5, 3, 1, 7, 3, 5, 1, 9, 1, 1, 7, 1, 1, 3, 1, 5, 9, 7, 11, 3, 5, 1, 3, 1, 7, 9, 1, 1, 3, 11, 5, 7, 1, 1, 9, 5, 1, 3, 7, 1, 11, 1, 13, 9
Offset: 1
Programs
-
Mathematica
a[n_]:=Module[{k=2n-1},While[!Divisible[2n-1,k] || k>Sqrt[2n-1] ,k--]; k]; Array[a,86] (* Stefano Spezia, Nov 17 2024 *)
-
PARI
a(n) = {my(d = divisors(2*n-1)); d[ceil(#d/2)]} \\ Thomas Scheuerle, Nov 17 2024