Solved


List the first of three consecutive square-free numbers
The numbers 13, 14, and 15 are consecutive, of course, but they also share the property of being square-free. That is, each numb...

29 days ago

Solved


Express numbers as the sum of a prime, a square, and a cube
While traveling on an interstate highway, I noticed a sign that gave distances to three places. The distances were 3, 8, and 9 m...

29 days ago

Solved


Calculating distance of lightning based on time delay
If we know the time delay between when we see lightning and hear thunder then we can calculate approximate distance(in meters) o...

29 days ago

Solved


finding vector pair with min angle between them
given a matrix with more than one row , compare row vectors of the given matrix and find the pair with the minumum angle between...

29 days ago

Solved


Merge two integers
We want to merge the digits of two integers having the same number of digits to obtain a new integer whose digits are obtained b...

29 days ago

Solved


Count the ways to write 1/n as the sum of two unit fractions
The number 1/2 can be written as 1/3+1/6 and 1/4+1/4, and the number 1/9 can be written as 1/18+1/18, 1/12+1/36, and 1/10+1/90. ...

29 days ago

Solved


Classify numbers as abundant, deficient, or perfect
A number is perfect if the sum of its proper divisors (i.e., divisors excluding the number itself) is equal to itself. For examp...

30 days ago

Solved


Calculating the Union Area of Overlapping Rectangles
Calculate the area covered by a union of multiple rectangles. Each rectangle is represented by 4 integers: the first two integer...

30 days ago

Solved


List primes of the form xy+z
Consider three consecutive integers , , and . When is the number prime? For example, if or , then the results are 17 and 37, ...

30 days ago

Solved


Extend the digamma function to negative arguments
While solving one of Ramon Villamangca’s problems, I needed the value of , where is the digamma function. However, MATLAB’s fun...

30 days ago

Solved


Identify winnable games of Take a Square
A game has a pile of tokens, and two players alternate in taking a certain number of tokens from the pile, with the constraint t...

30 days ago

Solved


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

30 days ago

Solved


Find the closest geyser prime
My wife and I celebrated our honeymoon and our recent anniversary in Yellowstone and Grand Teton National Parks. After returning...

30 days ago

Solved


Delete some elements in the natural set and find the sum of the first n terms
Delete the number (except 0,1) with a complete square number from the natural set of numbers, form a new set of numbers, find th...

30 days ago

Solved


List the partitions of an integer
Several Cody problems deal with partitions of an integer, or the ways an integer can be written as the sum of positive numbers—...

30 days ago

Solved


Find the Nth number in the 8-sequence
Find the Nth number in the 8-sequence. 8, 16, 24, 32, 48, 56, 64, 72, 88, ... Hint: Refer test suites

30 days ago

Solved


Find the Nth number in the 7-sequence
Find the Nth number in the 7-sequence. 7, 14, 21, 28, 35, 42, 49, 56, 63, 77, 84, ... Hint: Refer test suites

30 days ago

Solved


Find the Nth number in the 6-sequence
Find the Nth number in the 6-sequence. 6, 12, 18, 24, 36, 42, 48, 54, 66, ... Hint: Refer test suites

30 days ago

Solved


Find the Nth number in the 5-sequence
Find the Nth number in the 5-sequence. 5, 15, 25, 35, 45, 55, ... Hint: Refer test suites

30 days ago

Solved


Find the Nth number in the 4-sequence
Find the Nth number in the 4-sequence. 4, 8, 12, 16, 24, 28, 32, 36, 44 ... Hint: Refer test suites

30 days ago

Solved


Find the Nth number in the 3-sequence
Find the Nth number in the 3-sequence. 3, 6, 9, 12, 15, 18, 21, 24, 27, 33 ... Hint: Refer test suites

30 days ago

Solved


Find the Nth number in the 2-sequence.
Find the Nth number in the sequence. 2, 4, 6, 8, 12, 14, 16, 18, 22, ... Hint: Refer test suites

30 days ago

Solved


2x2 binning of a large sparse matrix
Consider the 20000 x 20000 sparse matrix, A=round(sprand(2e4,2e4,1/1e4*100)*1000); The task is to divide this matrix into 2x...

1 month ago

Solved


Build a block Toeplitz matrix
A symmetric block Toeplitz matrix has the form, where the are compatibly-sized matrices. Write a routi...

1 month ago

Solved


Identify points inside a Reuleaux triangle
Write a function to identify points that lie in or on a Realeaux triangle, which is a curve of constant width. The input to the ...

1 month ago

Solved


Express integers in negabinary
Negabinary numbers are written in base -2. For example, the negabinary number 11010 is , or 6 in base 10. In a similar way, -3 i...

1 month ago

Solved


Count the primes resulting from changing one digit of a number
If you start with the number 24 and seek primes by changing a single digit, you can find two: 23 and 29. If you start with 130, ...

1 month ago

Solved


Sum of Even Fibonacci Numbers
Description: The Fibonacci sequence is defined as follows:F(1)=1,F(2)=1,F(n)=F(n−1)+F(n−2) for n>2 Write a function that compu...

1 month ago

Solved


Remove Duplicate Words from a Sentence
Given a sentence as a string, remove all duplicate words while keeping their first occurrence and maintaining the original word ...

1 month ago

Solved


Remove Duplicate Words from a Sentence.
Given a sentence, remove any duplicate words, leaving only the first occurrence of each word. The output sentence should have wo...

1 month ago

Load more