"Look and say" sequence
What's the next number in this sequence?
* [0]
* [1 0]
* [1 1 1 0]
* [3 1 1 0]
* [1 3 2 1 1 0]
This a variant on the w...
7 months 前
已解决
Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...
7 months 前
已解决
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...
How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers.
Example:
x = [1 2 3 4...
7 months 前
已解决
Fibonacci sequence
Calculate the nth Fibonacci number.
Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ...
Examples:
Input...
7 months 前
已解决
Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation,
* F(n) = F(n-1) + F(n-2)
* where F(1) = 1 and F(1)...
7 months 前
已解决
Sum of series I
What is the sum of the following sequence:
Σ(2k-1) for k=1...n
for different n?
7 months 前
已解决
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x.
<<https://i.imgur.com/jlZDHhq.png>>
Image courtesy of <http://up...
7 months 前
已解决
Sum of series III
What is the sum of the following sequence:
Σ(2k-1)^3 for k=1...n
for different n?
7 months 前
已解决
Basic Mathematics 4
Team #1 is in first place but only one point higher than Team #2. The sum of their two scores is N. What are each team’s scores...