> #Attendence Q1: > #In how many ways can you walk from 0 to 131 using as fundamental steps the set {a[3], a[5], a[9]}? 179009929 ; > #Ans: a[3] = 7, a[5] = 1, a[9] = 9, so {1,7,9}. ; > #f(x) := 1/(1-x-x^7-x^9) ; > #763647434231397 ; > ; > #Attendence Q2: > #Is this sequence in the OEIS? ; > f:= normal(1/(1-(x+x^4) /(1-x^5))); Typesetting:-mprintslash([(f := (x^5-1)/(x^5+x^4+x-1))],[(x^5-1)/(x^5+x^4+x-1)] ) ; > L:= [seq(coeff(taylor(f, x=0, 41),x,i), i=0..100)] Typesetting:-mprintslash([(L := [1, 1, 1, 1, 2, 3, 5, 7, 10, 15, 23, 35, 52, 77 , 115, 173, 260, 389, 581, 869, 1302, 1951, 2921, 4371, 6542, 9795, 14667, 21959, 32872, 49209, 73671, 110297, 165128, 247209, 370089, 554057, 829482, 1241819, 1859117, 2783263, 4166802, O(1), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])],[[1, 1, 1, 1, 2, 3, 5, 7, 10, 15, 23, 35, 52, 77, 115, 173, 260, 389, 581, 869, 1302, 1951, 2921 , 4371, 6542, 9795, 14667, 21959, 32872, 49209, 73671, 110297, 165128, 247209, 370089, 554057, 829482, 1241819, 1859117, 2783263, 4166802, O(1), 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0]]) ; > L [1, 1, 1, 1, 2, 3, 5, 7, 10, 15, 23, 35, 52, 77, 115, 173, 260, 389, 581, 869, 1302, 1951, 2921, 4371, 6542, 9795, 14667, 21959, 32872, 49209, 73671, 110297, 165128, 247209, 370089, 554057, 829482, 1241819, 1859117, 2783263, 4166802, O(1 ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ; > #NO! ; > ; > ; > ; > #Attendence Q3: > #Let f(x)=1/(1-4*x-x^6); > #(i) find the coefficient of x^100 in the Taylor expansion of f(x) ; > #(ii) find the coefficient of x^101 in the Taylor expansion of f(x) ; > #(iii) how far is a(101)/a(100) from the real root of 1-4*x-x^6 ; > a101:= [seq(coeff(taylor((1/(1-4*x-x^6)), x=0, 101),x,i) , i=0..100)][101] Typesetting:-mprintslash([(a101 := 1644594257296515568488059327938971072084521685469936722570496)],[ 1644594257296515568488059327938971072084521685469936722570496]) ; > a100:=[seq(coeff(taylor((1/(1-4*x-x^6)), x=0, 101),x,i) , i=0..100)][100] Typesetting:-mprintslash([(a100 := 411048332990455915104492378532366163275381170780171837436480)],[ 411048332990455915104492378532366163275381170780171837436480]) ; > a:=evalf(a101/a100) Typesetting:-mprintslash([(a := 4.000975373)],[4.000975373]) ; > f:= 1/(1-4*x-x^6) Typesetting:-mprintslash([(f := 1/(-x^6-4*x+1))],[1/(-x^6-4*x+1)]) ; > denom(f) x^6+4*x-1 ; > fsolve(%) ; > b:=1/.2499390541 Typesetting:-mprintslash([(b := 4.000975372)],[4.000975372]) ; > abs(a-b) .1e-8 ; > ; > ; > ; > #Attendence Q4: > #In how many ways can a chess king walk from one corner of the chess board to the opposite corner? ; > f:=normal(1/(1-x/(1-x) - y/(1-y))); Typesetting:-mprintslash([(f := (-1+x)*(-1+y)/(3*x*y-2*x-2*y+1))],[(-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); Typesetting:-mprintslash([(A := (m, n) -> coeff(taylor(coeff(taylor(f,x = 0,m+1 ),x,m),y = 0,n+1),y,n))],[(m, n) -> coeff(taylor(coeff(taylor(f,x = 0,m+1),x,m) ,y = 0,n+1),y,n)]) ; > A(7,7); 470010 ; > ; > ; > ; > #Attendence Q5: in the OEIS? ; > seq(A(i,i), i=0..20) 1, 2, 14, 106, 838, 6802, 56190, 470010, 3968310, 33747490, 288654574, 2480593546, 21400729382, 185239360178, 1607913963614, 13991107041306, 122002082809110, 1065855419418690, 9327252391907790, 81744134786314410, 717367363052796678 ; > #Yes! > #A051708 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 ; > ;