File: rtest_recur.mac

package info (click to toggle)
maxima-sage 5.45.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 113,788 kB
  • sloc: lisp: 440,833; fortran: 14,665; perl: 14,369; tcl: 10,997; sh: 4,475; makefile: 2,520; ansic: 447; python: 262; xml: 59; awk: 37; sed: 17
file content (32 lines) | stat: -rw-r--r-- 859 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(kill(all), 'done);
'done$

(load("recur.mac"), 'done);
'done$

(declare(n, integer),
  matchdeclare(nn, lambda([e], symbolp(e) and featurep(e, integer))),
  tellsimpafter('binomial(nn, nn), 1),
  'done);
'done$

char(u(n+3)+6*u(n+2)+12*u(n+1)+8*u(n),0,u,n,3,[u(0)=1,u(1)=-2,u(2)=8]);
u(n) = (n^2/2-n/2+1)*(-2)^n$

char(u(n+1)-u(n),(1/6)*n*(n-1)*(n-2)+n-1,u,n,1,[u(0)=1]);
u(n) = n*(n^3/24-n^2/4+23*n/24-7/4)+1$

char(u(n+2)-2*u(n+1)+u(n),n**2,u,n,2,[u(0)=0,u(1)=1]);
u(n) = n^2*(n^2/12-n/3+5/12)+5*n/6$

genf(u(n+2)-u(n),2**n,u,n,2,[u(0)=1,u(1)=0]);
u(n) = 2^n/3+2*(-1)^n/3$

char(u(n+2)-4*u(n),3+2*n,u,n,2,[u(0)=1,u(1)=0]);
u(n) = 7*2^(n-2)+25*(-2)^(n-2)/9-2*n/3-13/9$

varc1(u(n+1)-(n+1)*u(n),1,u,n,1,[u(0)=1]);
u(n) = ('sum(1/i1!,i1,0,n))*n!$

varc2(u(n+1)-(n+1)*u(n),1,u,n,1,[u(0)=1]);
u(n) = ('product(i+1,i,1,n-1))*'sum(1/'product(j+1,j,1,i-1),i,0,n)$