OFFSET
1,3
COMMENTS
Second column of A027446. - Olivier Gérard, Dec 11 1999
LINKS
Robert Israel, Table of n, a(n) for n = 1..2296
FORMULA
Numerators of sequence a[ 2, n ] in (a[ i, j ])^2 where a[ i, j ] = 1/i if j<=i, 0 if j>i. - N. J. A. Sloane, Feb 24 2006
a(n) = (Psi(n+1)-1+gamma)*LCM(n), LCM(n) = lcm{1..n}. - Peter Luschny, Dec 01 2011
EXAMPLE
a(3) = (1/2+1/3)*lcm(2,3) = 5.
MAPLE
A027457 := n -> (Psi(n+1)-1+gamma)*lcm(seq(k, k=1..n)): # Peter Luschny, Dec 01 2011
# alternative:
A[1]:= 0: L[1]:= 1:
for n from 1 to 50 do
L[n+1]:= ilcm(L[n], n+1);
A[n+1]:= L[n+1]*(A[n]/L[n] + 1/(n+1))
od:
seq(A[n], n=1..50); # Robert Israel, Dec 14 2016
MATHEMATICA
a[n_] := (HarmonicNumber[n] - 1)*LCM @@ Range[n]; Table[a[n], {n, 1, 29}] (* Jean-François Alcover, Mar 05 2013 *)
PROG
(Magma) [(HarmonicNumber(n)-1)*Lcm([1..n]): n in [1..30]]; // Vincenzo Librandi, Dec 14 2016
(PARI) a(n) = (sum(i=1, n, 1/i)-1)*lcm([1..n]); \\ Michel Marcus, Jul 23 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
New name, offset changed to 1, a(1) and a(21)-a(29) added. - Peter Luschny, Dec 01 2011
STATUS
approved