Find the nth term of the series 0 , 8 , 64 , 216 , 512 , . . . | Function to return the nth term of the given series ; Common difference ; First term ; nth term ; nth term of the given series ; Driver code
< ? php function term ( $ n ) { $ d = 2 ; $ a1 = 0 ; $ An = $ a1 + ( $ n - 1 ) * $ d ; return pow ( $ An , 3 ) ; } $ n = 5 ; echo term ( $ n ) ; ? >