login
A307642
a(n) = n!*Sum_{i=1..n} (Sum_{j=1..i} (i/j)).
1
1, 8, 57, 428, 3510, 31644, 312984, 3380544, 39664080, 502927200, 6858181440, 100135491840, 1559197261440, 25797280723200, 452046655872000, 8364495012249600, 162994310248089600, 3336683369519001600, 71596721810396160000, 1606993396943155200000
OFFSET
1,2
FORMULA
a(n) = n! * Sum_{i=1..n} (Sum_{j=1..i} (i/j)).
a(n) = n * A182541(n+2).
a(n) = (1/4) * n * (n+1)! * (2*harmonic(n+1) - 1).
EXAMPLE
a(3) = 57 because a(3) = 3!*Sum_{i=1..3} (Sum_{j=1..i} (i/j)).
MATHEMATICA
Array[#!*Sum[Sum[i/j, {j, i}], {i, #}] &, 25] (* Michael De Vlieger, Apr 21 2019 *)
Table[n*(n+1)!*(2*HarmonicNumber[n+1] -1)/4, {n, 25}] (* G. C. Greubel, Jul 15 2019 *)
PROG
(PARI) a(n)=n!*sum(i=1, n, sum(j=1, i, i/j)); \\ Michel Marcus, Apr 20 2019
(Magma) [n*Factorial(n+1)*(2*HarmonicNumber(n+1)-1)/4: n in [1..25]]; // G. C. Greubel, Jul 15 2019
(Sage) [n*factorial(n+1)*(2*harmonic_number(n+1)-1)/4 for n in (1..25)] # G. C. Greubel, Jul 15 2019
(GAP) List([1..25], n-> n*Factorial(n+1)*(1+2*Sum([2..n+1], j-> 1/j))/4 ); # G. C. Greubel, Jul 15 2019
CROSSREFS
Cf. A001008/A002805 (harmonic), A182541.
Sequence in context: A281355 A281912 A343352 * A338676 A199555 A241594
KEYWORD
nonn
AUTHOR
Pedro Caceres, Apr 19 2019
STATUS
approved