maths 15pts

2012-05-24 12:53 am
1.Define f(n) to be the sum of all the prime digits of n. e.g. f(12345)=2+3+5=10.
Find the value of f(1)+f(2)+f(3)+...+f(2011).2. 4 boys (B1,B2,B3 and B4) and 3 girls (G1,G2 and G3) are seated in a straight line.The seating arrangement is ''funny'' if 3 of the boys are seated together.
e.g. B4B2B3G1B1G3G2 and B4B2B3B1G3G2G1 are ''funny '' but B4G2B3G1B1B2G3 is not ''funny''.
Find the number of ''funny '' seating arrangements.3. Let g(n) denotes the number of positive factors of n. e.g. g(6)=4,g(7)=2.
IF a_1,a_2,...,a_k denote all the positive factors of 2310, find the value of
(g(a_1))^3+(g(a_2))^3+...+(g(a_k))^3

回答 (2)

2012-05-24 3:02 pm
之前數錯了,還是自由自在精明,並不要用遞迴來算的。


原來的更正如下,不值參考。

定義:

g(1) = f(1) + ... + f(9) = 17。
g(2) = f(1) + ... + f(99)。
g(3) = f(1) + ... + f(999)。

g(2) = 10g(1) + g(1)10 = 20g(1) = 340。
g(3) = 10g(2) + g(1)100 = 300g(1) = 5100。

f(1) + ... + f(2011)
= 2g(3) + g(1) + (12)(2) = 10241。


收錄日期: 2021-04-23 23:27:00
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20120523000051KK00332

檢視 Wayback Machine 備份