Quote (feanur @ Apr 22 2016 01:58pm)
3) The easiest way is simply to check any possible positive x, y. There are not many of them, given that x^3 and y^3 are both inferior to 100 : x and y must be chosen among 1,2,3 or 4 because 5^3 is already too large.
11)
1 -> A
2 -> B
For i = 1 to (n-1) :
A*B -> C
B -> A
C -> B
End
Display B
Notice that a_n = 2^f_n, where f_n is the nth term of the Fibonacci sequence starting with 0 and 1. Hence, you can produce an explicit formulae for a_n.
12)
a) 2 * 4^7 : 2 choices for the last base, 4 choices for every 7 other bases.
b ) 4^6 : 4 choices for every 6 bases in the middle.
c) 4^7 : 4 choices for every 7 finishing bases.
d) 2^8 : 2 choices for every 8 bases.
... unless I miss an important property of DNA sequences.
Only thing I can think of on # 12 is that AT and CG would be paired in normal DNA. Not sure they care about that for this problem though.