> #THE NUMBER OF ATTENDANCE QUESTIONS WERE:5 ; > #Q1 ; > ; > #Let a[i] be the i-th digit of your RUID(0->1) ; > #In how many ways can you walk form 0 to 131 using as fundamental steps ; > #the set {a[3],a[5],a[9]} ; > ; > #{a[3],a[5],a[9]}={9,1,3} ; > f := 1/(1-x^9-x-x^3) f := 1/(-x^9-x^3-x+1) ; > NewGFseq:=proc(f,x,N) local f1,i: > f1:=taylor(f,x=0,N+1): > [seq(coeff(f1,x,i),i=N)]: > end: > NewGFseq(f,x,131) [28830935682301534955677] ; > ; > #Q2 ; > ; > #Is this sequence in the OEIS? ; > ; > #Yes, the A number is A116975. ; > #it is "Number of compositions of n into parts of sizes == 1 mod 5 or 4 mod 5." ; > ; > #Q3 ; > ; > #Let f(x)=1/(1-4*x-x^6); > #(1) Find the coeddicient of x^100 in the Taylor expansion of f(x) ; > #(2) Find the coeddicient of x^101 in the Taylor expansion of f(x) ; > #How far is a a(100)/a(100) from the real root of 1-4*x-x^6 ; > ; > ff :=1/(1-4*x-x^6) ff := 1/(-x^6-4*x+1) ; > NewGFseq(ff,x,100) [1644594257296515568488059327938971072084521685469936722570496] ; > NewGFseq(ff,x,101) [6579981121576468112367189280234473995254094130576501178758144] ; > ff :=1/(1-4*x-x^6) ff := 1/(-x^6-4*x+1) ; > L:=[seq(coeff(taylor(ff,x=0,101),x,i),i=0..100)] L := [1, 4, 16, 64, 256, 1024, 4097, 16392, 65584, 262400, 1049856, 4200448, 16805889, 67239948, 269025376, 1076363904, 4306505472, 17230222336, 68937695233, 275818020880, 1103541108896, 4415240799488, 17665269703424, 70678309036032, 282782173839361, 1131404513378324, 4526721594622192, 18111301619288256, 72462871746856448, 289922165296461824, 1159971443359686657, 4641017177952124952, 18568595433403122000, 74292493035231776256, 297242435012673961472, 1189259662215992307712, 4758198620307328917505, 19037435498407267794972, 76168310589062474301888, 304747534849285128983808, 1219287381832153189896704, 4878338786990828751894528, 19518113346583622336495617, 78091490821832896613777440, 312442131597920648929411648, 1250073273926531880846630400, 5001512383087959676576418304, 20010927871138829535057567744, 80063229597901901762566766593, 320331009882429439946880843812, 1281636481661315680436452786896, 5127795999919189253626657777984, 20516185512059844974183207530240, 82084752976110518726267887688704, 328419075134039976806834117521409, 1313996631546042336667283350929448, 5257268162665830662349569856504688, 21034200446663241838651906083796736, 84157317972165027199581807542717184, 336711356641636219317053498058557440, 1347173845641678917245020826351751169, 5390009379198261711316750588757934124, 21565294784955712675929351924888241184, 86282213340269513945556059605636761472, 345213010679050220809423820230089763072, 1381188754072842519457012334418417609728, 5526102190137011756745294358500022190081, 22109798769927245288692494184588846694448, 88460760374493936867445906090280275018976, 353929323711316016983729180420726736837376, 1416062507855943118155726145503137037112576, 5665631220177845315142361594346966566060032, 22668050982901518272326191671746366286430209, 90694313730376000334593459181170053992415284, 362865715681878495275241282630770496244680112, 1451816792051225297117948859703502711715557824, 5808683230712757131589951164959513983899343872, 23240398554071206371674947021432402902163435520, 92984262267267727004972114277401357974940172289, 372027743382801284020223050568786601953753104440, 1488473839246887014576167443557777178311257097872, 5955347173779599283601787723090812215956743949312, 23827197378349109891538740843528208377810875141120, 95332029911950510772526638321134265914145664000000, 381421103910069310817111525398814465014557596172289, 1526056443383660044552466324645826646660184137793596, 6105714247373887065224441466026864363819047808272256, 24428812336669327860181367651830548267492147977038336, 97739076544055660550617009348165721278346402783294464, 391051638206134592713240564030984019379299756797177856, 1564587973928448440163779367649334891982213584784883713, 6259877952157177420699669936921985394575514523277328448, 25045617522876083569863904189153968442665877140917586048, 100206898903841003607315798124267704318931000711647382528, 400925334691908070089813809506418982997002349249372824576, 1604092390405838414951968478589706916007388696754288476160, 6417934149597282108248037693726476998921537000601938788353, 25677996476341285610412850444842829981080723516931032481860, 102737031522888018525221265683560473892765559944865047513488, 411048332990455915104492378532366163275381170780171837436480, 1644594257296515568488059327938971072084521685469936722570496] ; > nops(L) 101 ; > evalf(L[100]/L[100]) 1. ; > ; > #Q4 ; > ; > #In how many ways can a chess king walk from 1 corner of the chess board to the opposite corner? ; > ; > f:=(-1+x)*(-1+y)/(3*x*y-2*x-2*y+1) f := (-1+x)*(-1+y)/(3*x*y-2*x-2*y+1) ; > A:=(m,n)-> coeff(taylor(coeff(taylor(f,x=0,m+1),x,m), y=0, n+1),y,n); A := proc (m, n) options operator, arrow; coeff(taylor(coeff(taylor(f, x = 0, m+1), x, m), y = 0, n+1), y, n) end proc ; > A(8,8) 3968310 ; > ; > ; > #Q5 ; > ; > #Is the sequence in the OEIS? ; > ; > #Yes, the A number is A051708 ; > #It is "Number of ways to move a chess rook from the lower left corner to square (n,n), with the rook moving only up or right." ;