03-20-2013, 06:27 PM
|
#25
|
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: This time not stupid math
You can also use
http://en.wikipedia.org/wiki/Faulhaber%27s_formula
With the recursive definition for the Bernoulli numbers defined here
http://en.wikipedia.org/wiki/Bernoul...ive_definition
But I mean it may as well just be this...
Code:
def brute(x,y):
return sum(i**(x-1) for i in range(1,y))
Last edited by Reincarnate; 03-20-2013 at 06:35 PM..
|
|
|