Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...
3年弱 前
解決済み
Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...
3年弱 前
解決済み
Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58.
A n x n spiral matrix is obtained by starting with the number 1 and moving to the right ...
3年弱 前
解決済み
Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.
Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...
3年弱 前
解決済み
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...
Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55...