Solved

Sum of first n terms of a harmonic progression

Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

2 years ago

Solved

Polygonal numbers

The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

2 years ago

Solved

Bell Number calculator

Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

2 years ago

Solved

Polite numbers. Politeness.

A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

2 years ago

Solved

Polite numbers. N-th polite number.

A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

2 years ago

Solved

Generalised Hamming Number

Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

2 years ago

Solved

Smith numbers

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

2 years ago

Solved

Evil Number

Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

2 years ago

Solved

Armstrong Number

Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

2 years ago

Solved

Find the 9's Complement

Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

2 years ago

Solved

Narcissistic number ?

Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

2 years ago

Solved

Kaprekar numbers

Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

2 years ago

Solved

Parasitic numbers

Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

2 years ago

Solved

Compute Fibonacci Number

Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

2 years ago

Solved

Determine if a Given Number is a Triangle Number

*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

2 years ago

Solved

Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)

Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

2 years ago

Solved

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

2 years ago

Solved

The Glass Half Full

Identical glasses are placed in a triangular tower structure, such that the top level (L = 1) comprises one glass, the next leve...

2 years ago

Solved

ASCII Birthday Cake

Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

2 years ago

Solved

Breaking Out of the Matrix

Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

2 years ago

Solved

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

2 years ago

Solved

Sums of Multiple Pairs of Triangular Numbers

This is a follow-up to <https://www.mathworks.com/matlabcentral/cody/problems/44289 Problem 44289> - Find two triangular numbers...

2 years ago

Solved

Polarisation

You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

2 years ago

Solved

MATLAB Counter

Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b. E...

2 years ago

Solved

The Top 5 Primes

This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

2 years ago

Solved

Inscribed Pentagon?

Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

2 years ago

Solved

Recaman Sequence - II

Take an arbitrary starting point as input and create Recaman Sequence. Then find the 1, return its index. For example: if n =...

2 years ago

Solved

Missing five

Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

2 years ago

Solved

Circle/Pentagon Overlap

Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

2 years ago