Skip to main content
improved formatting and edited tags
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first 20$20$ terms of this sequence and find the sum of all terms and sum of all even numbers of 20$20$ terms. I tried

Clear[u];
u[1] := 1; u[2] := 2;
u[3] := 3;
u[y_] := -u[y - 3] + 3u[y - 2] + 2u[y - 1]
A := Table[ u[k], {k, 1, 20}] 

Sum[ A[[i]], {i, 1, Length[A]}]

I can't find sum of even numbers. How do I tell Mathematica to do that  ?

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first 20 terms of this sequence and find the sum of all terms and sum of all even numbers of 20 terms. I tried

Clear[u];
u[1] := 1; u[2] := 2;
u[3] := 3;
u[y_] := -u[y - 3] + 3u[y - 2] + 2u[y - 1]
A := Table[ u[k], {k, 1, 20}]
Sum[ A[[i]], {i, 1, Length[A]}]

I can't find sum of even numbers. How do I tell Mathematica to do that?

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first $20$ terms of this sequence and find the sum of all terms and sum of all even numbers of $20$ terms. I tried

Clear[u];
u[1] := 1; u[2] := 2;
u[3] := 3;
u[y_] := -u[y - 3] + 3u[y - 2] + 2u[y - 1]
A := Table[ u[k], {k, 1, 20}] 

Sum[ A[[i]], {i, 1, Length[A]}]

I can't find sum of even numbers. How do I tell Mathematica to do that  ?

edited body; edited tags
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first 20 terms of this sequence and find the sum of all terms and sum of all even numbers of 20 terms. I tried

Clear[u];
u[1] := 1; u[2] := 2;
u[3] := 3;
u[y_] := -u[y - 3] + 3*u[y3u[y - 2] + 2*u[y2u[y - 1]
A := Table[u[k]Table[ u[k], {k, 1, 20}]
Sum[A[[i]]Sum[ A[[i]], {i, 1, Length[A]}]

I can't find sum of even numbers. How do I tell Mathematica to do that?

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first 20 terms of this sequence and find the sum of all terms and sum of all even numbers of 20 terms. I tried

Clear[u];
u[1] := 1; u[2] := 2;
u[3] := 3;
u[y_] := -u[y - 3] + 3*u[y - 2] + 2*u[y - 1]
A := Table[u[k], {k, 1, 20}]
Sum[A[[i]], {i, 1, Length[A]}]

I can't find sum of even numbers. How do I tell Mathematica to do that?

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first 20 terms of this sequence and find the sum of all terms and sum of all even numbers of 20 terms. I tried

Clear[u];
u[1] := 1; u[2] := 2;
u[3] := 3;
u[y_] := -u[y - 3] + 3u[y - 2] + 2u[y - 1]
A := Table[ u[k], {k, 1, 20}]
Sum[ A[[i]], {i, 1, Length[A]}]

I can't find sum of even numbers. How do I tell Mathematica to do that?

Retagged to a tag better classifying the question
Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259
Tweeted twitter.com/#!/StackMma/status/282708205656748032
Source Link
minthao_2011
  • 4.5k
  • 3
  • 32
  • 47
Loading