|
|
A226725
|
|
Denominator of the median of {1, 1/2, 1/3, ..., 1/n}.
|
|
2
|
|
|
1, 4, 2, 12, 3, 24, 4, 40, 5, 60, 6, 84, 7, 112, 8, 144, 9, 180, 10, 220, 11, 264, 12, 312, 13, 364, 14, 420, 15, 480, 16, 544, 17, 612, 18, 684, 19, 760, 20, 840, 21, 924, 22, 1012, 23, 1104, 24, 1200, 25, 1300, 26, 1404, 27, 1512, 28, 1624, 29, 1740, 30
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (n+1)/2 if n is odd, a(n) = n*(n/2+1) if n is even.
G.f.: W(0), where W(k)= 1 + 2*x*(k+2)/( 1 - x/(x + 2*(k+1)/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 16 2013
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). - Colin Barker, Feb 27 2015
G.f.: x*(x^2-4*x-1) / ((x-1)^3*(x+1)^3). - Colin Barker, Feb 27 2015
a(n) = n^(1/2 + (-1)^n/2)*(n + 2^(1/2 + (-1)^n/2))/2. - Wesley Ivan Hurt, Feb 27 2015
|
|
EXAMPLE
|
median{1, 1/2, 1/3, 1/4} = (1/2 + 1/3)/2 = 7/12, so that a(4) = 12.
|
|
MAPLE
|
|
|
MATHEMATICA
|
Denominator[Table[Median[Table[1/k, {k, n}]], {n, 120}]]
f[n_] := If[ OddQ@ n, Floor[(n + 1)/2], n(n/2 + 1)]; Array[f, 59] (* Robert G. Wilson v, Feb 27 2015 *)
With[{nn=30}, Riffle[Range[nn], Table[2n+2n^2, {n, nn}]]] (* Harvey P. Dale, May 26 2019 *)
Riffle[Range[60], LinearRecurrence[{3, -3, 1}, {4, 12, 24}, 60]] (* Harvey P. Dale, Oct 03 2023 *)
|
|
PROG
|
(PARI) Vec(x*(x^2-4*x-1)/((x-1)^3*(x+1)^3) + O(x^100)) \\ Colin Barker, Feb 27 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|