Question: Sequence by induction

Hey guys,

  Now I'm encountering another problem. I'm trying to assign a[n] as:

a[1]=1

a[n]=a[n-1]+1/2^(n-1)

I tried the following:

a:=[1, seq(a[n-1]+1/2^(n-1),n=2..10);

The result is "Recursive error".

The problem is this is a good recursive. Maple seems to simply not recognize recursive input at all.

I tried another way:

a[1]:=1

a:=[seq(a[n-1]+1/2^(n-1),n=2..10);

Result is the same.

I tried another way

a[1]:=1

a[n]:=[seq(a[n-1]+1/2^(n-1),n=2..10]

Result: (3/2, *+a[2], *+a[3]...)

Then I tried to extract:

a[2];

Output: a[2] (which means it has no value)

a[n[2]];

Output: a[n[2]]

a[n,2];

Output: a[n,2]

 

Question: is there any way to create a sequence by induction?

Please Wait...