Sum of fifth powers of the first n natural numbers | calculate the sum of fifth power of first n natural numbers ; Driver Code
< ? php 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 ; } $ n = 5 ; echo ( fifthPowerSum ( $ n ) ) ; ? >