Sum of fifth powers of the first n natural numbers | calculate the sum of fifth power of first n natural numbers ; Driven Program
function fifthPowerSum ( n ) { return ( ( 2 * n * n * n * n * n * n ) + ( 6 * n * n * n * n * n ) + ( 5 * n * n * n * n ) - ( n * n ) ) / 12 ; } let n = 5 ; document . write ( fifthPowerSum ( n ) + " " ) ;