Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Cons

Function: cons (<expr>, <list>) Returns a new list constructed of the element <expr> as its first element, followed by the elements of <list>. cons also works on other expressions, e.g. cons(x, f(a,b,c)); -> f(x,a,b,c).

d(n):=divsum(n)-n;
abu(n):=if d(n) > n then true else false;
l : [];
 for i : 0 thru 28123 do (if abu(i) then (l:cons(li,[i])));
print(length(l));
print(member(12,l));

There are also some inexact matches for cons. Try ?? cons to see them.

(%o1)                                true
(%i2) 

Related Examples

cons-divsum-do-length-member-print

d(n):=divsum(n)-n;

abu(n):=if d(n) > ...

l : [];

Calculate

cons-example

example(cons);

Calculate

cons-divsum-do-length-member-print

d(n):=divsum(n)-n;

abu(n):=if d(n) > ...

l : [];

Calculate

cons-divsum-do-length-member-print

d(n):=divsum(n)-n;

abu(n):=if d(n) > ...

l : [];

Calculate

cons-example

example(cons);

Calculate

cons-divsum-do-length-member-print

d(n):=divsum(n)-n;

abu(n):=if d(n) > ...

l : [];

Calculate