List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Goodstein sequence
| [MUG] Goodstein sequence |
|
Author: Joe
Posted: Tue, 3 Dec 2002 23:02:09 -0000
|
>> From: "Joe" "Joe13121312"
Hi,I am one of a university student and I have got a question in Maple 7
want to ask. Please, help.
Are there any shortcut (e.g. like gcd,lcm or convert etc.)in Maple that help
us to work out
e.g. (I think this is what we call Goodstein sequence,but not sure)
you got a number 275 and a base say 2 to convert to this form
2^8+2^4+2+1 or 2^(2^(2+1))+2^(2^(2))+2+1
if a base 3 then convert to
3^5+3^3+3+2 or 3(3+2)+3^3+3+2
if not could you help me write a procedure to solve this kind of problem or
give me some hints about how to start to write this procedure in Maple. Also
where can I find any information about this.
Thank you and my e-mail is "joe13121312"
|
| [MUG] Re: Goodstein sequence |
|
Author: Maple User Group
Posted: Fri, 6 Dec 2002 18:02:21 -0500 (
|
>> From: Maple User Group "maple_gr"
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 4 Dec 2002 18:38:32 -0500 (EST)
From: Carl Devore "devore"
To: "maple-list"
Subject: Goodstein sequence
On Tue, 3 Dec 2002, Joe wrote:
> Are there any shortcut (e.g. like gcd,lcm or convert etc.)in Maple that help
> us to work out
> e.g. (I think this is what we call Goodstein sequence,but not sure)
> you got a number 275 and a base say 2 to convert to this form
> 2^8+2^4+2+1 or 2^(2^(2+1))+2^(2^(2))+2+1
Base conversion just requires integer quotients and remainders (iquo or
irem). No gcd's required. Or you can just use convert(275, base, 2).
Then apply that recursively to the expoments and cpnvert it to an
unevaluated exponential form for printing:
Goodstein:= proc(n,b)
local i,x;
x:= convert(n,base,b);
if n<b then n else add(x[i]*``(b)^Goodstein(i-1,b), i= 1..nops(x)) fi
end proc;
Goodstein(275,2);
Goodstein(275,3);
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 5 Dec 2002 07:57:48 +0530 (IST)
From: A Prashanth pg ee "aprash"
To: "maple-list"
Subject: Goodstein sequence
i guess you're trying to convert between bases. you should employ the
'convert' command (built into maple 7) to perform the transformation.
there exist two valid syntaxes for the command that allow you to transform
numbers of base 10 to numbers of any base or a list of numbers in one base
to a second base. look up help on 'convert, base' and the examples there
to learn how to run this command. hope that helps.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 04 Dec 2002 22:07:40 -0800
From: "Maple"
Subject: Goodstein sequence
To: "maple-list"
Joe,
I don't know about "Goodstein sequences", but Maple's "convert" routine
converts between arbitrary bases. For some strange reason it returns the
results in reverse order of what I would expect (LSB on the left), so you
have to be careful of that.
> convert(275,base,3);
[2, 1, 0, 1, 0, 1]
> evalf(2*3^0 + 3^1 + 3^3 + 3^5);
275.
> convert([2,1,0,1,0,1],base,3,10);
[5, 7, 2]
>
-- Ron
|
Previous by date: [MUG] Re: same function with different arrangement give different
plots?, Maple User Group
Next by date: [MUG] Curious simplification, Greg Gamble
Previous thread: [MUG] Maple and real-time data, Denis Sevee
Next thread: [MUG] Curious simplification, Greg Gamble
|