数列{an}满足a1=1,a2=2,a(n+2)=(1+cos(nπ/2)^2)an+sin(nπ/2)^2,n=1,2,3,……求a3,a4,并求数列{an}的通项公式.
问题描述:
数列{an}满足a1=1,a2=2,a(n+2)=(1+cos(nπ/2)^2)an+sin(nπ/2)^2,n=1,2,3,……
求a3,a4,并求数列{an}的通项公式.
答
n为奇数时 sin(nπ/2)^2=1 偶数时为0
n为奇数时 1+cos(nπ/2)^2=0 偶数时为2
故n为奇数时 a n+2 = 0an +1 =1
n为偶数时 a n+2 = 2 an
故 an =
1 (n为奇数)
2^(n/2) (n为偶数)
故a3=1 a4=4