Resuelto


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime numb...

3 meses hace

Resuelto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

3 meses hace

Resuelto


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

3 meses hace

Resuelto


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

3 meses hace

Resuelto


Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

3 meses hace

Resuelto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

3 meses hace

Resuelto


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

3 meses hace

Resuelto


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at http://en.wikipedia...

3 meses hace

Resuelto


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

3 meses hace

Resuelto


Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

3 meses hace

Resuelto


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

3 meses hace

Resuelto


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)...

3 meses hace

Resuelto


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.

3 meses hace

Resuelto


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

3 meses hace

Resuelto


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

3 meses hace

Resuelto


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

3 meses hace

Resuelto


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

3 meses hace

Resuelto


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...

3 meses hace

Resuelto


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

3 meses hace

Resuelto


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. ...

3 meses hace

Resuelto


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...

3 meses hace

Resuelto


Fermat primes
Historical context The french mathematician Pierre de Fermat found the formula to find some prime numbers. He thought / co...

3 meses hace

Resuelto


Ulam primes first formula
Historical context The polish-american mathematician Stanislaw Ulam found the formula to give the first 760 prime numbers ...

3 meses hace

Resuelto


Ulam primes second formula
Historical context The polish-american mathematician Stanislaw Ulam found the formula to give some prime numbers not given...

3 meses hace

Resuelto


Euler primes
Historical context The great swiss mathematician Leonhard Euler found the formula to give some prime numbers. Problem...

3 meses hace

Resuelto


Frequencies of prime gaps
Problem statement Given two positive integers n and , write a function which computes the frequency of the gap between two ...

3 meses hace

Resuelto


Find the first occurence of a given gap between two consecutive prime numbers
Problem statement Given a gap = p' - p between the two consecutive prime numbers p and p', find its first occurence, f. E...

3 meses hace

Resuelto


Prime numbers which are the difference of two consecutive cubes
Problem statement Given a positive integer n greater than 2, find the prime numbers less or equal to n and which are the diff...

3 meses hace

Resuelto


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

3 meses hace

Resuelto


String Logic 10
Examples: 'SUNDAY' --> 83 'MONDAY' --> 77 'TUESDAY' --> 84 'WEDNESDAY' --> 87 'THURSDAY' --> 84 'FRIDAY' --> 70 'SATURD...

3 meses hace

Cargar más