> #Attendence Q1: > #Convert the following recurrence to explicit form ; > #6*f(n)+12*f(n+1)+18*f(n+3)=0 ; > #18*f(n+3)=-12*f(n+1)-6*f(n)=> f(n+3)=-2/3*f(n+1)-1/3*f(n) ; > ; > #Attendence Q2: > #find f(5) and f(6) of f(n)=3*f(n-1)-4*f(n-2), f(0)=1, f(1)=-2 ; > #f(3)=-22 and f(4)=-26, ; > #f(5)=3*(-26)-4*(-22)=-78+88=10 ; > #f(6)=3*10-4*(-26)=30+104=134 ; > ; > #Attendence Q3: > #What is F(10^6) and how long it will take ; > #What is f(10^6) and how long it will take ; > F:=proc(n) local i, L: > L:=[1, -2]: > for i from 1 to n-1 do > L:= [L[2], 3*L[2]-4*L[1]]: > od: > L[2]: > end: > F(10^6) 2458745050599682757015378035481882035383438999154580592871756279661111973933372\ 4323227334277019047662800223513513007222211091690541109692942492801343595471107\ 7802856882717048083977441932402313241619380880910242833409823483411110628712474\ 7277439171748855065146634561853883098694457260734834556826648282030463253117675\ 1806260902271841374822871178004883607204026868269977077800132862880390741638466\ 5348917410921174249464581742676336925838095165325935884340027144561635721584581\ 4391928254665283494710126888210259273905575307080071231037547205676559413011773\ 0080687019343028580432669064572339921651183595333055037764518286167923806172700\ 6285366148731665015688043542112133589875942138252495535793450034988396501956710\ 6659223367720479533317594168351341718171605122382456479744990367263655622316646\ 9469888183476058544601622261995568728275404807698685781332625001130523817506703\ 5444337097734975257831118946691570355553067636686279888586762931261745674607590\ 4058318988808584876278208277690895099764404937256230211874181814113534149929291\ 9375710414841472722898261913280990896776808332042453988971032033816972776333452\ 6381791219765943710663675947155675023997070096973497080081019538627192251290800\ 1034730576717221170217500592596067207053176250696610555825180226279304038960126\ 3221686298352092922312172790479836282499516441962453063915658166285800827677934\ 5795785771558413793979066266486644854560110068842058457529992301851840443236735\ 8782486278477629139005503166533425583229092875127065201601910295004030471593527\ 2266239913193047705958669216869491872213960702656186585005811019874810396569793\ 0878722049933748353794643431088107073869649744746473960422914921239733994453410\ 2268206314700382587369774185206060314854016364259666794741725024173139135619383\ 3155086204115737153982427694319396037266465986373843841431288293347942974655547\ 9038528708148374994490007824979466797920741105922493372897484161013191203868938\ 2592299900522516058220350777905774102940114767956001278340538567700906955732693\ 0952190292540199009650671861719608805505080383841397414424628142490133684804245\ 7087914497063404917083380079922507972655961698366387953527082899381046285317855\ 9213853024418278169347491952112464875113826017072659746337526789727287534812299\ 7922291530415756900030492848991794840610443753618973895383881347137062057940082\ 9552875698998036609297174805791005570092166120279771889654755268002283638889666\ 7542469580467734709832189841660613559186485845664622830758111832112635310760570\ 9863411789557406291321455309803300978423154569177204273222743727304725085059672\ 4494265792708503298188507426600125804970300231203269052944064014942899219681161\ 8961795528499185459447774418223493043847473010212408656072991192928538132784379\ 5678965347845230652805679802458915462944476993816252020231482053819149201973111\ 0126065271321693702035915646636439347682201189780757337265830338437110050349563\ 5024216712534440040762858770828505274055964552245630233087077561185153700174816\ 8422843319603850532456198773032516143190483145870129111714738551917695912200752\ 7097966490747292069800650054003292596310771818519463933224168742652712912238947\ 7334435018617285996519406516841419434362765173389983840953667647359426307391074\ 0410564366713421247048183089915579100957797108483247807290218025700972508198051\ 9554105978444145922702685208679612995587050234549241137818721955523361101056482\ 4184351270457951082495945677547048750837257605991943217001614371480544296429376\ 1413000022402256868044094949638062240152845302425451545779331841846059324790183\ 1968232864974871545240011442539024296326076628214399335496899196850998386774213\ 9320688635819356868251228030220250891618866455539742985193701331767380643290473\ 0404326539941575333806947741078928978250249014433709799277860686077697724910638\ 7463541020625336548790284064924338355706716897768085356654882955848035156516529\ 0591848651640293750053788372413914956674386350926943526516590770973616372039273\ 4673587838018510041162064579312743694410233284334102738145740347606708404111008\ 0820560677953861728445818726501864394466434389706161020678678818307168611560607\ 4232142426428978705803988356400048775411094424387053162785150417887218965532938\ 1134053388265048860631161515824043402825021188825568268258139173013529608041281\ 799177496492575226281525633253755419254999369199 ; > #168s ; > ; > f:=proc(n) option remember: if n=0 then 1 elif n=1 then -2 else 3*f(n-1)-4*f(n-2):fi:end: > f(10^6) Error, (in f) too many levels of recursion ; > #f(10^6) does not work. ; > ; > #Attendence Q4: > #Consider the sequence that is defined by the recurrence ; > #f(n+1000)=f(n+999)+5*f(n). ; > #What is the operator ope(N) such that ope(N) f(n) = 0 ; > #f(n+1000)-f(n+999)-5*f(n)=0 ; > #ope(N):=N^1000-N^999-5 ; > ; > #Attendence Q5: > #Characterize the sequences that satisfy a homogeneous recurrence of order zero ; > #f(n+1)=c*f(n), ; > ; > #Attendence Q6: > #can you prove that d(n)/n! ->1/e ; > #d(n)=(n-1)*(d(n-1)+d(n-2)) ; > #d(n)= n!*sum((-1)^i/i!, i=0..n) ; > #e^x = sum(x^i/i!, i=0..n), ; > #lim n->infinity d(n)/n! ->1/e by using x=-1 ; > ; > #Attendence Q7: > #What is the OEIS A number of this sequemce? ; > #A85 ; > ; > #Attendence Q8: > #Find the operators in N and N^(-1) annihilated by w(n) ; > #w(n)-w(n-1)-(n-1)*w(n-2)=0 => 1-N^(-1)-(n-1)*N^(-2) ; > ; > #Attendence Q9: > ?ZeilbergerRecurrence ; > #ZeilbergerRecurrence(T, n, k, f, l..u) ; > # ; > ;