## Story
Before we dive into the exercise, I would like to show you why these numbers are so important in computer programming today.
It all goes back to the time of 19th century. Where computers we know today were non-existing. The first ever **computer program** was for the Analytical Engine to compute **Bernoulli numbers**. A woman named Ada Lovelace wrote the very first program. The sad part is the engine was never fully build so her code was never tested. She also predicted the start of **AI** (artificial intelligence).
Computers will be able to compose music by themselves, solve problems (not only numbers) ... So in her honor reproduce what was done back in 1842. The Bernoulli numbers are a sequence of rational numbers with deep connections to number theory. The Swiss mathematician Jakob Bernoulli and the Japanese mathematician Seki Kowa discovered the numbers around the same time at the start of the 18th Century. If you want to read more about her or Bernoulli numbers follow these links:
https://en.wikipedia.org/wiki/Ada_Lovelace
https://en.wikipedia.org/wiki/Bernoulli_number
http://mathworld.wolfram.com/BernoulliNumber.html
## Exercise
Your job is to write a function `bernoulli_number(n)` which outputs the n-th Bernoulli number. The input will always be a non-negative integer so you do not need to worry about exceptions. How you will solve the problem is none of my business but here are some guidelines.  
You can make pascal triangle and then with the basic formula generate all Bernoulli numbers. Look example below.
For the sake of floating numbers, just use `Fractions` so there will be no problems with rounding.
0 = 1 + 2b1 ............................................................... 
  b1 = - 1/2
0 = 1 + 3b1 + 3b2 ...................................................    b2        = 1/6
0 = 1 + 4b1 + 6b2 + 4b3 .......................................  b3 = 0
0 = 1 + 5b1 + 10b2 + 10b3 + 5b4 ...................... b4 = - 1/30
... and so on.
```
bernoulli_number(0) # return 1
bernoulli_number(1) # return Fraction(-1,2) or Rational(-1,2) or "1/2"
bernoulli_number(6) # return Fraction(1,42) or ...
bernoulli_number(42) # return Fraction(1520097643918070802691,1806) or ...
bernoulli_number(22) # return Fraction(854513,138) or ... "854513/138"
```
## Note
See "Sample Tests" to see the return type for each language.
Good luck and happy coding! 
PS: be careful some numbers might exceed `1000`.
If this kata is too hard for you try to solve pascal triangle and something similar to this and then come back :).
from fractions import Fraction

def GetBinominal(Row, Column):
    Solve = Fraction(1,1)
    if (Column > Row - Column):
        Column = Row - Column;

    for i in range(Column):
        Solve *= (Row - i)
        Solve /= (i + 1)

    return Solve;

def bernoulli_number(n):
    if n == 0:
        return 1
    if n == 1:
        return -0.5
    if n % 2 != 0:
        return 0   # all odds after n=1 are 0.

    # Built list using this same function, to avoid crazy timeout issue with server ...
    CachedList = [1, -0.5, Fraction(1, 6), 0, Fraction(-1, 30), 0, Fraction(1, 42), 0, Fraction(-1, 30), 0, Fraction(5, 66), 0,
     Fraction(-691, 2730), 0, Fraction(7, 6), 0, Fraction(-3617, 510), 0, Fraction(43867, 798), 0,
     Fraction(-174611, 330), 0, Fraction(854513, 138), 0, Fraction(-236364091, 2730), 0, Fraction(8553103, 6), 0,
     Fraction(-23749461029, 870), 0, Fraction(8615841276005, 14322), 0, Fraction(-7709321041217, 510), 0,
     Fraction(2577687858367, 6), 0, Fraction(-26315271553053477373, 1919190), 0, Fraction(2929993913841559, 6), 0,
     Fraction(-261082718496449122051, 13530), 0, Fraction(1520097643918070802691, 1806), 0,
     Fraction(-27833269579301024235023, 690), 0, Fraction(596451111593912163277961, 282), 0,
     Fraction(-5609403368997817686249127547, 46410), 0, Fraction(495057205241079648212477525, 66), 0,
     Fraction(-801165718135489957347924991853, 1590), 0, Fraction(29149963634884862421418123812691, 798), 0,
     Fraction(-2479392929313226753685415739663229, 870), 0, Fraction(84483613348880041862046775994036021, 354), 0,
     Fraction(-1215233140483755572040304994079820246041491, 56786730), 0,
     Fraction(12300585434086858541953039857403386151, 6), 0, Fraction(-106783830147866529886385444979142647942017, 510),
     0, Fraction(1472600022126335654051619428551932342241899101, 64722), 0,
     Fraction(-78773130858718728141909149208474606244347001, 30), 0,
     Fraction(1505381347333367003803076567377857208511438160235, 4686), 0,
     Fraction(-5827954961669944110438277244641067365282488301844260429, 140100870), 0,
     Fraction(34152417289221168014330073731472635186688307783087, 6), 0,
     Fraction(-24655088825935372707687196040585199904365267828865801, 30), 0,
     Fraction(414846365575400828295179035549542073492199375372400483487, 3318), 0,
     Fraction(-4603784299479457646935574969019046849794257872751288919656867, 230010), 0,
     Fraction(1677014149185145836823154509786269900207736027570253414881613, 498), 0,
     Fraction(-2024576195935290360231131160111731009989917391198090877281083932477, 3404310), 0,
     Fraction(660714619417678653573847847426261496277830686653388931761996983, 6), 0,
     Fraction(-1311426488674017507995511424019311843345750275572028644296919890574047, 61410), 0,
     Fraction(1179057279021082799884123351249215083775254949669647116231545215727922535, 272118), 0,
     Fraction(-1295585948207537527989427828538576749659341483719435143023316326829946247, 1410), 0,
     Fraction(1220813806579744469607301679413201203958508415202696621436215105284649447, 6), 0,
     Fraction(-211600449597266513097597728109824233673043954389060234150638733420050668349987259, 4501770), 0,
     Fraction(67908260672905495624051117546403605607342195728504487509073961249992947058239, 6), 0,
     Fraction(-94598037819122125295227433069493721872702841533066936133385696204311395415197247711, 33330), 0,
     Fraction(3204019410860907078243020782116241775491817197152717450679002501086861530836678158791, 4326), 0,
     Fraction(-319533631363830011287103352796174274671189606078272738327103470162849568365549721224053, 1590), 0,
     Fraction(36373903172617414408151820151593427169231298640581690038930816378281879873386202346572901, 642), 0,
     Fraction(-3469342247847828789552088659323852541399766785760491146870005891371501266319724897592306597338057,
              209191710), 0,
     Fraction(7645992940484742892248134246724347500528752413412307906683593870759797606269585779977930217515, 1518), 0,
     Fraction(-2650879602155099713352597214685162014443151499192509896451788427680966756514875515366781203552600109,
              1671270), 0,
     Fraction(21737832319369163333310761086652991475721156679090831360806110114933605484234593650904188618562649, 42),
     0,
     Fraction(-309553916571842976912513458033841416869004128064329844245504045721008957524571968271388199595754752259,
              1770), 0,
     Fraction(366963119969713111534947151585585006684606361080699204301059440676414485045806461889371776354517095799,
              6), 0, Fraction(
        -51507486535079109061843996857849983274095170353262675213092869167199297474922985358811329367077682677803282070131,
        2328255930), 0, Fraction(
        49633666079262581912532637475990757438722790311060139770309311793150683214100431329033113678098037968564431, 6),
     0, Fraction(
        -95876775334247128750774903107542444620578830013297336819553512729358593354435944413631943610268472689094609001,
        30), 0, Fraction(
        5556330281949274850616324408918951380525567307126747246796782304333594286400508981287241419934529638692081513802696639,
        4357878), 0, Fraction(
        -267754707742548082886954405585282394779291459592551740629978686063357792734863530145362663093519862048495908453718017,
        510), 0, Fraction(
        1928215175136130915645299522271596435307611010164728458783733020528548622403504078595174411693893882739334735142562418015,
        8646), 0, Fraction(
        -410951945846993378209020486523571938123258077870477502433469747962650070754704863812646392801863686694106805747335370312946831,
        4206930), 0, Fraction(
        264590171870717725633635737248879015151254525593168688411918554840667765591690540727987316391252434348664694639349484190167,
        6), 0, Fraction(
        -84290226343367405131287578060366193649336612397547435767189206912230442242628212786558235455817749737691517685781164837036649737,
        4110), 0, Fraction(
        2694866548990880936043851683724113040849078494664282483862150893060478501559546243423633375693325757795709438325907154973590288136429,
        274386), 0, Fraction(
        -3289490986435898803930699548851884006880537476931130981307467085162504802973618096693859598125274741604181467826651144393874696601946049,
        679470), 0, Fraction(
        14731853280888589565870080442453214239804217023990642676194878997407546061581643106569966189211748270209483494554402556608073385149191,
        6), 0, Fraction(
        -3050244698373607565035155836901726357405007104256566761884191852434851033744761276392695669329626855965183503295793517411526056244431024612640493,
        2381714790), 0, Fraction(
        4120570026280114871526113315907864026165545608808541153973817680034790262683524284855810008621905238290240143481403022987037271683989824863,
        6), 0, Fraction(
        -1691737145614018979865561095112166189607682852147301400816480675916957871178648433284821493606361235973346584667336181793937950344828557898347149,
        4470), 0, Fraction(
        463365579389162741443284425811806264982233725425295799852299807325379315501572305760030594769688296308375193913787703707693010224101613904227979066275,
        2162622), 0, Fraction(
        -3737018141155108502105892888491282165837489531488932951768507127182409731328472084456653639812530140212355374618917309552824925858430886313795805601,
        30), 0, Fraction(
        10259718682038021051027794238379184461025738652460569233992776489750881337506863808448685054322627708245455888249006715516690124228801409697850408284121,
        138), 0, Fraction(
        -81718086083262628510756459753673452313595710396116467582152090596092548699138346942995509488284650803976836337164670494733866559829768848363506624334818961419869,
        1794590070), 0, Fraction(
        171672676901153210072183083506103395137513922274029564150500135265308148197358551999205867870374013289728260984269623579880772408522396975250682773558018919,
        6), 0, Fraction(
        -4240860794203310376065563492361156949989398087086373214710625778458441940477839981850928830420029285687066701804645453159767402961229305942765784122421197736180867,
        230010), 0, Fraction(
        1584451495144416428390934243279426140836596476080786316960222380784239380974799880364363647978168634590418215854419793716549388865905348534375629928732008786233507729,
        130074), 0, Fraction(
        -20538064609143216265571979586692646837805331023148645068133372383930344948316600591203926388540940814833173322793804325084945094828524860626092013547281335356200073083,
        2490), 0, Fraction(
        5734032969370860921631095311392645731505222358555208498573088911303001784652122964703205752709194193095246308611264121678834250704468082648313788124754168671815815821441,
        1002), 0, Fraction(
        -13844828515176396081238346585063517228531109156984345249260453934317772754836791258987516540324983611569758649525983347408589045734176589270143058509026392246407576578281097477,
        3404310), 0, Fraction(
        195334207626637530414976779238462234481410337350988427215139995707346979124686918267688171536352650572535330369818176979951931477427594872783018749894699157917782460035894085,
        66), 0, Fraction(
        -11443702211333328447187179942991846613008046506032421731755258148665287832264931024781365962633301701773088470841621804328201008020129996955549467573217659587609679405537739509973,
        5190), 0, Fraction(
        4166161554662042831884959593250717297395614318182561412048180684077407803317591270831194619293832107482426945655143357909807251852859279483176373435697607639883085093246499347128331,
        2478), 0, Fraction(
        -1369347910486705707645621362512824332220360774476594348356938715366608044588614657557436131706543948464159947970464346070253278291989696390096800799614617317655510118710460076077638883999,
        1043970), 0, Fraction(
        1124251816617941290026484851206299982774720467712867275292043701618829826708395745459654170718363182143418314514085426692857018428614935412736063946853033094328968069656979232446257101741,
        1074), 0, Fraction(
        -6173136454016248924640522272263470960199559328290655337530202055853397791747341312347030141906500993752700612233695954532816018207721731818225290076670213481102834647254685911917265818955932383093313,
        7225713885390), 0, Fraction(
        4277269279349192541137304400628629348327468135828402291661683018622451659989595510712915810436238721139546963558655260384328988773219688091443529626531335687951612545946030357929306651006711,
        6), 0, Fraction(
        -857321333523056180131194437347933216431403305730705359015465649285681432317514010686029079324479659634642384809061711319481020030715989009140595170556956196762318625529645723516532076273012244047,
        1410), 0, Fraction(
        22258646098436968050639602221816385181596567918515338169946670500599612225742487595012775838387331550474751212260636163500086787417640903770807353228157478339547041472679880890292167353534100797481,
        42), 0, Fraction(
        -14158277750623758793309386870401397333112823632717478051426522029712001260747920789473711562165031101665618225654329210473605281619696918061316240634857984019071572591940586875558943580878119388321001,
        30), 0, Fraction(
        5411555842544259796131885546196787277987837486638756184149141588783989774511509608733429067517383750706299486822702171672522203106730993581242777825864203487238429479957280273093904025319950569633979493395,
        12606), 0, Fraction(
        -346465752997582699690191405750952366871923192340955593486485715370392154894102000406980162521728492501917598012711402163530166516991115122131398542029056286959857727373568402417020319761912636411646719477318166587,
        868841610), 0, Fraction(
        2269186825161532962833665086968359967389321429297588337232986752409765414223476696863199759981611817660735753831323900456495253961837175924312108872915089534970310604331636484174526399721365966337809334021247,
        6), 0, Fraction(
        -62753135110461193672553106699893713603153054153311895305590639107017824640241378480484625554578576142115835788960865534532214560982925549798683762705231316611716668749347221458005671217067357943416524984438771831113,
        171390), 0, Fraction(
        88527914861348004968400581010530565220544526400339548429439843908721196349579494069282285662653465989920237253162555666526385826449862863083834096823053048072002986184254693991336699593468906111158296442729034119206322233,
        244713882), 0]

    if n<len(CachedList):
        return CachedList[n]
    #if n > 2:  #to debug daft timeout
    #    print(n)
    #    return 1

    BernoulliNumbers = [Fraction(1,1), Fraction(1,2)]
    Solution = Fraction(1,1)

    for i in range(2,n+1):
        for j in range(i):
            if j < 3 or j % 2 == 0:
                Solution -= GetBinominal(i,j)*(Fraction(BernoulliNumbers[j],(i-j+1)))

        BernoulliNumbers.append(Solution)
        Solution=Fraction(1,1)

    return BernoulliNumbers[n]
from fractions import Fraction

def GetBinominal(Row, Column):
    Solve = Fraction(1,1)
    if (Column > Row - Column):
        Column = Row - Column;

    for i in range(Column):
        Solve *= (Row - i)
        Solve /= (i + 1)

    return Solve;

def bernoulli_number(n):
    if n == 0:
        return 1
    if n == 1:
        return -0.5
    if n % 2 != 0:
        return 0   # all odds after n=1 are 0.

    # Built list using this same function, to avoid crazy timeout issue with server ...
    CachedList = [1, -0.5, Fraction(1, 6), 0, Fraction(-1, 30), 0, Fraction(1, 42), 0, Fraction(-1, 30), 0, Fraction(5, 66), 0,
     Fraction(-691, 2730), 0, Fraction(7, 6), 0, Fraction(-3617, 510), 0, Fraction(43867, 798), 0,
     Fraction(-174611, 330), 0, Fraction(854513, 138), 0, Fraction(-236364091, 2730), 0, Fraction(8553103, 6), 0,
     Fraction(-23749461029, 870), 0, Fraction(8615841276005, 14322), 0, Fraction(-7709321041217, 510), 0,
     Fraction(2577687858367, 6), 0, Fraction(-26315271553053477373, 1919190), 0, Fraction(2929993913841559, 6), 0,
     Fraction(-261082718496449122051, 13530), 0, Fraction(1520097643918070802691, 1806), 0,
     Fraction(-27833269579301024235023, 690), 0, Fraction(596451111593912163277961, 282), 0,
     Fraction(-5609403368997817686249127547, 46410), 0, Fraction(495057205241079648212477525, 66), 0,
     Fraction(-801165718135489957347924991853, 1590), 0, Fraction(29149963634884862421418123812691, 798), 0,
     Fraction(-2479392929313226753685415739663229, 870), 0, Fraction(84483613348880041862046775994036021, 354), 0,
     Fraction(-1215233140483755572040304994079820246041491, 56786730), 0,
     Fraction(12300585434086858541953039857403386151, 6), 0, Fraction(-106783830147866529886385444979142647942017, 510),
     0, Fraction(1472600022126335654051619428551932342241899101, 64722), 0,
     Fraction(-78773130858718728141909149208474606244347001, 30), 0,
     Fraction(1505381347333367003803076567377857208511438160235, 4686), 0,
     Fraction(-5827954961669944110438277244641067365282488301844260429, 140100870), 0,
     Fraction(34152417289221168014330073731472635186688307783087, 6), 0,
     Fraction(-24655088825935372707687196040585199904365267828865801, 30), 0,
     Fraction(414846365575400828295179035549542073492199375372400483487, 3318), 0,
     Fraction(-4603784299479457646935574969019046849794257872751288919656867, 230010), 0,
     Fraction(1677014149185145836823154509786269900207736027570253414881613, 498), 0,
     Fraction(-2024576195935290360231131160111731009989917391198090877281083932477, 3404310), 0,
     Fraction(660714619417678653573847847426261496277830686653388931761996983, 6), 0,
     Fraction(-1311426488674017507995511424019311843345750275572028644296919890574047, 61410), 0,
     Fraction(1179057279021082799884123351249215083775254949669647116231545215727922535, 272118), 0,
     Fraction(-1295585948207537527989427828538576749659341483719435143023316326829946247, 1410), 0,
     Fraction(1220813806579744469607301679413201203958508415202696621436215105284649447, 6), 0,
     Fraction(-211600449597266513097597728109824233673043954389060234150638733420050668349987259, 4501770), 0,
     Fraction(67908260672905495624051117546403605607342195728504487509073961249992947058239, 6), 0,
     Fraction(-94598037819122125295227433069493721872702841533066936133385696204311395415197247711, 33330), 0,
     Fraction(3204019410860907078243020782116241775491817197152717450679002501086861530836678158791, 4326), 0,
     Fraction(-319533631363830011287103352796174274671189606078272738327103470162849568365549721224053, 1590), 0,
     Fraction(36373903172617414408151820151593427169231298640581690038930816378281879873386202346572901, 642), 0,
     Fraction(-3469342247847828789552088659323852541399766785760491146870005891371501266319724897592306597338057,
              209191710), 0,
     Fraction(7645992940484742892248134246724347500528752413412307906683593870759797606269585779977930217515, 1518), 0,
     Fraction(-2650879602155099713352597214685162014443151499192509896451788427680966756514875515366781203552600109,
              1671270), 0,
     Fraction(21737832319369163333310761086652991475721156679090831360806110114933605484234593650904188618562649, 42),
     0,
     Fraction(-309553916571842976912513458033841416869004128064329844245504045721008957524571968271388199595754752259,
              1770), 0,
     Fraction(366963119969713111534947151585585006684606361080699204301059440676414485045806461889371776354517095799,
              6), 0, Fraction(
        -51507486535079109061843996857849983274095170353262675213092869167199297474922985358811329367077682677803282070131,
        2328255930), 0, Fraction(
        49633666079262581912532637475990757438722790311060139770309311793150683214100431329033113678098037968564431, 6),
     0, Fraction(
        -95876775334247128750774903107542444620578830013297336819553512729358593354435944413631943610268472689094609001,
        30), 0, Fraction(
        5556330281949274850616324408918951380525567307126747246796782304333594286400508981287241419934529638692081513802696639,
        4357878), 0, Fraction(
        -267754707742548082886954405585282394779291459592551740629978686063357792734863530145362663093519862048495908453718017,
        510), 0, Fraction(
        1928215175136130915645299522271596435307611010164728458783733020528548622403504078595174411693893882739334735142562418015,
        8646), 0, Fraction(
        -410951945846993378209020486523571938123258077870477502433469747962650070754704863812646392801863686694106805747335370312946831,
        4206930), 0, Fraction(
        264590171870717725633635737248879015151254525593168688411918554840667765591690540727987316391252434348664694639349484190167,
        6), 0, Fraction(
        -84290226343367405131287578060366193649336612397547435767189206912230442242628212786558235455817749737691517685781164837036649737,
        4110), 0, Fraction(
        2694866548990880936043851683724113040849078494664282483862150893060478501559546243423633375693325757795709438325907154973590288136429,
        274386), 0, Fraction(
        -3289490986435898803930699548851884006880537476931130981307467085162504802973618096693859598125274741604181467826651144393874696601946049,
        679470), 0, Fraction(
        14731853280888589565870080442453214239804217023990642676194878997407546061581643106569966189211748270209483494554402556608073385149191,
        6), 0, Fraction(
        -3050244698373607565035155836901726357405007104256566761884191852434851033744761276392695669329626855965183503295793517411526056244431024612640493,
        2381714790), 0, Fraction(
        4120570026280114871526113315907864026165545608808541153973817680034790262683524284855810008621905238290240143481403022987037271683989824863,
        6), 0, Fraction(
        -1691737145614018979865561095112166189607682852147301400816480675916957871178648433284821493606361235973346584667336181793937950344828557898347149,
        4470), 0, Fraction(
        463365579389162741443284425811806264982233725425295799852299807325379315501572305760030594769688296308375193913787703707693010224101613904227979066275,
        2162622), 0, Fraction(
        -3737018141155108502105892888491282165837489531488932951768507127182409731328472084456653639812530140212355374618917309552824925858430886313795805601,
        30), 0, Fraction(
        10259718682038021051027794238379184461025738652460569233992776489750881337506863808448685054322627708245455888249006715516690124228801409697850408284121,
        138), 0, Fraction(
        -81718086083262628510756459753673452313595710396116467582152090596092548699138346942995509488284650803976836337164670494733866559829768848363506624334818961419869,
        1794590070), 0, Fraction(
        171672676901153210072183083506103395137513922274029564150500135265308148197358551999205867870374013289728260984269623579880772408522396975250682773558018919,
        6), 0, Fraction(
        -4240860794203310376065563492361156949989398087086373214710625778458441940477839981850928830420029285687066701804645453159767402961229305942765784122421197736180867,
        230010), 0, Fraction(
        1584451495144416428390934243279426140836596476080786316960222380784239380974799880364363647978168634590418215854419793716549388865905348534375629928732008786233507729,
        130074), 0, Fraction(
        -20538064609143216265571979586692646837805331023148645068133372383930344948316600591203926388540940814833173322793804325084945094828524860626092013547281335356200073083,
        2490), 0, Fraction(
        5734032969370860921631095311392645731505222358555208498573088911303001784652122964703205752709194193095246308611264121678834250704468082648313788124754168671815815821441,
        1002), 0, Fraction(
        -13844828515176396081238346585063517228531109156984345249260453934317772754836791258987516540324983611569758649525983347408589045734176589270143058509026392246407576578281097477,
        3404310), 0, Fraction(
        195334207626637530414976779238462234481410337350988427215139995707346979124686918267688171536352650572535330369818176979951931477427594872783018749894699157917782460035894085,
        66), 0, Fraction(
        -11443702211333328447187179942991846613008046506032421731755258148665287832264931024781365962633301701773088470841621804328201008020129996955549467573217659587609679405537739509973,
        5190), 0, Fraction(
        4166161554662042831884959593250717297395614318182561412048180684077407803317591270831194619293832107482426945655143357909807251852859279483176373435697607639883085093246499347128331,
        2478), 0, Fraction(
        -1369347910486705707645621362512824332220360774476594348356938715366608044588614657557436131706543948464159947970464346070253278291989696390096800799614617317655510118710460076077638883999,
        1043970), 0, Fraction(
        1124251816617941290026484851206299982774720467712867275292043701618829826708395745459654170718363182143418314514085426692857018428614935412736063946853033094328968069656979232446257101741,
        1074), 0, Fraction(
        -6173136454016248924640522272263470960199559328290655337530202055853397791747341312347030141906500993752700612233695954532816018207721731818225290076670213481102834647254685911917265818955932383093313,
        7225713885390), 0, Fraction(
        4277269279349192541137304400628629348327468135828402291661683018622451659989595510712915810436238721139546963558655260384328988773219688091443529626531335687951612545946030357929306651006711,
        6), 0, Fraction(
        -857321333523056180131194437347933216431403305730705359015465649285681432317514010686029079324479659634642384809061711319481020030715989009140595170556956196762318625529645723516532076273012244047,
        1410), 0, Fraction(
        22258646098436968050639602221816385181596567918515338169946670500599612225742487595012775838387331550474751212260636163500086787417640903770807353228157478339547041472679880890292167353534100797481,
        42), 0, Fraction(
        -14158277750623758793309386870401397333112823632717478051426522029712001260747920789473711562165031101665618225654329210473605281619696918061316240634857984019071572591940586875558943580878119388321001,
        30), 0, Fraction(
        5411555842544259796131885546196787277987837486638756184149141588783989774511509608733429067517383750706299486822702171672522203106730993581242777825864203487238429479957280273093904025319950569633979493395,
        12606), 0, Fraction(
        -346465752997582699690191405750952366871923192340955593486485715370392154894102000406980162521728492501917598012711402163530166516991115122131398542029056286959857727373568402417020319761912636411646719477318166587,
        868841610), 0, Fraction(
        2269186825161532962833665086968359967389321429297588337232986752409765414223476696863199759981611817660735753831323900456495253961837175924312108872915089534970310604331636484174526399721365966337809334021247,
        6), 0, Fraction(
        -62753135110461193672553106699893713603153054153311895305590639107017824640241378480484625554578576142115835788960865534532214560982925549798683762705231316611716668749347221458005671217067357943416524984438771831113,
        171390), 0, Fraction(
        88527914861348004968400581010530565220544526400339548429439843908721196349579494069282285662653465989920237253162555666526385826449862863083834096823053048072002986184254693991336699593468906111158296442729034119206322233,
        244713882), 0]

    if n<len(CachedList):
        return CachedList[n]
    #if n > 2:  #to debug daft timeout
    #    print(n)
    #    return 1

    BernoulliNumbers = [Fraction(1,1), Fraction(1,2)]
    Solution = Fraction(1,1)

    for i in range(2,n+1):
        for j in range(i):
            if j < 3 or j % 2 == 0:
                Solution -= GetBinominal(i,j)*(Fraction(BernoulliNumbers[j],(i-j+1)))

        BernoulliNumbers.append(Solution)
        Solution=Fraction(1,1)

    return BernoulliNumbers[n]