Gelöst


Find patterns in subprime Fibonacci sequences
Lots of Cody problems involve Fibonacci and Collatz sequences. Fibonacci sequences start with two numbers, and later terms are c...

mehr als 3 Jahre vor

Gelöst


Is this triangle right-angled (mixed sides)?
Implement function returning if triangle is right angled or not? Input argument is vector row with not ordered triangle sides. ...

mehr als 3 Jahre vor

Gelöst


Hermite Polynomials
Problem 1304 deals with Hermite polynomial of the physicist's type. In this problem, Return the n-th Hermite polynomial of the ...

mehr als 3 Jahre vor

Gelöst


About jokes (and compression)
An argument can be made about jokes. The shorter they are, the funnier. Further explained here: https://en.wikipedia.org/wiki/Hu...

mehr als 3 Jahre vor

Gelöst


Counting Permutations
In the permutations of the numbers 1 to n, count the number of permutations in which exactly m elements are greater than the pre...

mehr als 3 Jahre vor

Gelöst


Compute the area of the shoemaker’s knife
A shape resembling a shoemaker’s knife is constructed from a semicircle with diameter with two semicircular “bites” of diameter...

mehr als 3 Jahre vor

Gelöst


Locate image wells
A mathematical model of wells pumping groundwater near a boundary can be constructed using the method of images, which is also u...

mehr als 3 Jahre vor

Gelöst


Compute the Lagarias Riemann Hypothesis sequence
Write a function that takes an input number and produces a sequence (i.e., all values up to and including the th value) compute...

mehr als 3 Jahre vor

Gelöst


Compute a nested cube root
Consider the quantity . Write a function to compute without using loops or recursion.

mehr als 3 Jahre vor

Gelöst


Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

mehr als 3 Jahre vor

Gelöst


Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis. Input: a poly...

mehr als 3 Jahre vor

Gelöst


Harmonic series counting
The function takes a positive limit as input, And counts how many terms must be summed in the harmonic series: 1/1, 1/2, 1/3, ...

mehr als 3 Jahre vor

Gelöst


Easy Sequences 86: The "real" Hyperprimorials
In Easy Sequences 85, we define the hyperprimorial of , as a exponent ladder of primes numbers from the -th prime down to first ...

mehr als 3 Jahre vor

Gelöst


Dyck words
A Dyck word can be considered as a string of n X's and n Y's arranged to have at least as many X's in an initial segment of the ...

mehr als 3 Jahre vor

Gelöst


Sum the unitary divisors of a number
Cody Problems 1933 and 46898 deal with , the sum of divisors function. This problem deals with , the sum of unitary divisors fun...

mehr als 3 Jahre vor

Gelöst


Count the unitary divisors of a number
Cody Problem 56738 asks for a list of the unitary divisors of a number. For this problem, write a function to count the unitary ...

mehr als 3 Jahre vor

Gelöst


IQpuzzler Challenge #2: Find all possible solutions on an empty 4-by-5 board with 5 pieces, rotating and flipping pieces allowed
We are playing a simplified version of IQpuzzler, with a smaller board of 4-by-5 spaces and just 5 pieces, as shown in the pictu...

mehr als 3 Jahre vor

Gelöst


Digits of Powers of 2
In Project Euler Problem #16, we are asked for sum of the digits of powers of 2. Here we will be asked for more than that. Give...

mehr als 3 Jahre vor

Gelöst


List unitary divisors of a number
A unitary divisor of a number divides and satisfies gcd(,) = 1. For example, 9 is a unitary divisor of 18 because gcd(9,2) = ...

mehr als 3 Jahre vor

Gelöst


IQpuzzler Challenge #1: Find all possible solutions with 2 pieces already on the board and fixed orientation of all other pieces
IQpuzzler is a one player board game. The 2D version provides a rectangular board with 5-by-11 spaces and 12 colored pieces (con...

mehr als 3 Jahre vor

Gelöst


Acid-Base Chemistry: Which side of the reaction is more favorable?
In an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided wit...

mehr als 3 Jahre vor

Gelöst


Just square the input
Square the number

mehr als 3 Jahre vor

Gelöst


Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

mehr als 3 Jahre vor

Gelöst


List numbers that are not in the Fibonacci sequence
In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a funct...

mehr als 3 Jahre vor

Gelöst


List the nth term of Rozhenko’s inventory sequence
Consider a sequence constructed by repeated inventories. A new inventory begins each time a zero is encountered. The first few i...

mehr als 3 Jahre vor

Gelöst


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

mehr als 3 Jahre vor

Gelöst


Prime Time
All you need to do here is submit your solution a prime number of seconds after the top of the hour. Any hour at all... Easy, ...

mehr als 3 Jahre vor

Gelöst


Leftovers? Again?!
I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

mehr als 3 Jahre vor

Gelöst


Multiply each matrix element by its row index and add its column index.
Return a matrix the same size as the input, multiply each element by its row index and add its column index. Example: x = [ 1 ...

mehr als 3 Jahre vor

Gelöst


Cluster Partition
Given an array (row or column) of numbers, divide the array into consecutive positive/negative numbers. 0 is to be treated inde...

mehr als 3 Jahre vor

Mehr laden