※ 引述《chilis (龐克新生報到^_^)》之銘言:
: Q2:
: For which of the following functions f is f(x) = f(1-x) for all x?
: A. f(x) = 1 - x
: B. f(x) = 1 - x2
: C. f(x) = x2 - (1-x)2
: D. f(x) = x2(1-x)2
: E. f(x) = x / (1-x)
: ----------------------------------------------------------------------------------------------------------------------
: Answer: D 不懂題目??
: Q9:
: A certain computer program generates a sequence of numbers a1, a2, … ,
: a n such that a1 = a2 = 1 and ak = ak-1 + 2ak-2 for all integers k such that
: 3 ? k ? n. If n > 6, then a7 = ?
: A. 32
: B. 43
: C. 64
: D. 100
: E. 128
: ----------------------------------------------------------------------------------------------------------------------
: Answer: B
: a1 =a0+2a-1=1
: a2 =a1+2a0= 1
: a3=a2+2a1=1+2*1=3=2^1+1
: a4=a3+2a2=3+2*1=5=2^2+1
: a5=a4+2a3=5+2*3=11
: a6=a5+2a4=11+2*5=21
: a7=a6+2a5=21+2*11=43
: 找不出規則變化,有快速解法嗎?
: 感謝:)
經過複雜的運算後,有導出公式如下:
An= ( 2^(n-1) * (-3 + (-1)^(n-1) ) -1 ) / (-3)
有點給他複雜,而且考試時間那麼趕,應該沒時間讓你導公式,
所以直接土法煉鋼從A1算到A7比較快XDD
不過土法煉鋼比較快的做法就是:
An會剛好=2*An-1 + (-1)^(n-1)
也就是會剛好=前一個數的2倍,再+1或-1 (n是偶數就-1,n是奇數就+1)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.166.135.134