Feeds
已解决
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
7 hours 前
已解决
Shapiro Polynomials
Given an order n, return the coefficients of 1st Shapiro polynomials Pn(x) - %Example P1(x) = x + 1 => Output = [1 1]; P...
13 hours 前
已解决
Rooky Towers
You are wandering and as you realise something's off, you find yourself lost in a peculiar place - Over a giant field which is ...
1 day 前
已解决
Touchard Polynomial
Return the coefficients of nth (n>=0) Touchard polynomials - T1(x) = x; output = [1 0]; T2(x) = x^2 + x; output = [1 1 0]...
3 days 前
已解决
Padovan Polynomials
Hello there. I'm afraid I bear bad news - Anakin Skywalker is no longer a Jedi. But fear not young Padawan, we shall not falter...
3 days 前
已解决
find powers of two
find the unique, non-repeating, powers of 2 that sum to a given non-zero integer, n example: n = 23 result = [1 2 4 16] ...
5 days 前
已解决
Stirling Numbers - I
Problems #1388 & #45187 deal with Stirling numbers of the 2nd Kind. Here, generate the Stirling numbers S(n,k) of the 1st kind ...
5 days 前
问题
Total Area Covered by Overlapping Polygons
Given a variable length set of polygon vertex coordinates, compute the total area covered. For example, take two polygons with t...
8 days 前 | 1 | 5 个解题者
已解决
Bernstein Basis Polynomials
Return the coefficients of a Bernstein Basis Polynomial B(v,n) for degree n and order v - %Examples B(2, 5) = 10*x^2*(1-x)...
10 days 前
已解决
Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a pass...
12 days 前
已解决
Multiply real numbers to get the smallest integers
Write a function that takes a vector of real numbers and multiplies them by a factor to produce the integers with the smallest a...
12 days 前
已解决
Dickson Polynomials
Return the coefficients of nth (n>=0) Dickson polynomial of the 1st kind as follows - 1st row of the output will be the coeffi...
12 days 前
已解决
Cummulative Count
Given a row vector of integers (with repeating values) , create an array that is the cumulative count of the unique values - ...
16 days 前
问题
Grimm's Conjecture
Grimm's conjecture states that to each element of a set of consecutive composite numbers, one can assign a unique prime number t...
21 days 前 | 0 | 3 个解题者
已解决
Search for seesaw primes
Cody Problem 60958 introduced seesaw numbers. A number is a seesaw number if the next smaller numbers can be placed on a seesa...
1 month 前
问题
Find the Prime Factors and Divisors of a Number
Given a positive integer n, find its prime factors as well as all of its divisors. Example: n=12 has prime factors [2,2,3] and ...
2 months 前 | 0 | 5 个解题者
已解决
Count the primes in Collatz sequences
Several Cody problems (21, 69, 42937, 44448, 44784, 52422) involve Collatz sequences. These start with a seed . If is odd, the ...
2 months 前
已解决
Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...
2 months 前
已解决
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...
2 months 前
已解决
Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...
2 months 前
已解决
Determine whether a number is a Blum integer
A Blum integer is a semiprime—that is, the product of two distinct primes—whose factors have the form for some integer . The nu...
2 months 前
已解决
List Ormiston prime pairs
The numbers 1913 and 1931 form the first Ormiston prime pair. The numbers are consecutive primes, and they are anagrams of each ...
2 months 前
已解决
Determine whether a number is a Ludic prime
Ludic numbers are formed by a sieve. Start with a list of the positive integers. Skip 1 and start with 2. Then delete every seco...
2 months 前
已解决
List numbers that cannot be expressed as the sum of two primes
The Goldbach conjecture claims that even numbers greater than 2 can be expressed as the sum of two prime numbers. What about the...
2 months 前
已解决
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, ...
2 months 前
已解决
Compute the number of squares a knight can reach after n moves
Several Cody problems involve knights from chess. They have asked players to find a knight’s tour in a matrix (CP 96), determine...
2 months 前
已解决
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...
2 months 前