解決済み


List the Fermi-Dirac primes
The Fermi-Dirac “primes” are prime powers with exponents that are powers of 2. The first nine terms of the sequence are 2, 3, 4,...

5ヶ月 前

解決済み


Identify de Polignac numbers
The numbers 125 and 329 can be written as the sum of a prime and a power of 2. For example, , and . The numbers 127 and 331, whi...

5ヶ月 前

解決済み


List numbers such that every sum of consecutive positive integers ending in those numbers is composite
The sequence in question in this problem involves numbers such that all sums of consecutive positive integers ending with are ...

5ヶ月 前

解決済み


List the two-bit primes
Each year at Christmas, my father-in-law and his partner send me the Puzzle Mania section from the New York Times. This year’s e...

5ヶ月 前

解決済み


Solve an equation involving primes and fractions
Write a function to find pairs of primes and satisfying the equation where is an integer. The function should take a numbe...

5ヶ月 前

解決済み


List odd twin composites
Twin primes, or prime numbers that differ by 2 (e.g., 17 and 19, 59 and 61, or 191 and 193), are the subject of several Cody pro...

5ヶ月 前

解決済み


List the Beatriz numbers
Write a function to find integers less than or equal to an input value that solve the equation . The function gives the sum o...

5ヶ月 前

解決済み


List the Euclid numbers
Euclid proved that the number of primes is infinite with the following argument. Suppose the primes form a finite set , , . Comp...

5ヶ月 前

解決済み


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

11ヶ月 前

解決済み


Usage of java.math : N Choose K with unlimited precision
Calculate the binomial coefficient nchoosek with full accuracy. This challenge may use the wonderful word of java.math that allo...

11ヶ月 前

解決済み


Get ranking of a combination looking for speed.
I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to...

11ヶ月 前

解決済み


Get ranking of a combination
I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to ...

11ヶ月 前

解決済み


Put m balls into n boxes (again)
According to Cody Problem 1516, if I put 3 balls into 2 boxes then 1 1 1 1 1 2 1 2 2 ...

11ヶ月 前

解決済み


Put m balls into n boxes
Can you find all the cases where, if I put 3 balls into 2 boxes the case is 1 1 1 1 1 2 1 ...

11ヶ月 前

解決済み


Numbered lottery balls into cells
You are running a lottery, and have a number of different balls numbered 1 to N. Your job is to figure out how many different w...

11ヶ月 前

解決済み


A (wrong) place for everything, and everything in its (wrong) place
You have an equal number of cups and balls, each labelled from one to N. You randomly place one ball in each cup. Determine th...

11ヶ月 前

解決済み


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

11ヶ月 前

解決済み


NCHOOSEK - Time Optimization
Input V —— Set of all choices, a vector of N, 1 < N < 100 K —— Number of selected choices, a scalar, 0 <= K <= N Output C ——...

11ヶ月 前

解決済み


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

11ヶ月 前

解決済み


Which permutation is it?
Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ....

11ヶ月 前

解決済み


N-th permutation.
Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ... ...

11ヶ月 前

解決済み


Diophantine Equations (Inspired by Project Euler, problem 66)
Consider the quadratic Diophantine equation of the form: x^2 – Dy^2 = 1 When D=13, the minimal solution in x is 649^2 – 13...

11ヶ月 前

解決済み


High Precision Square Root (Inspired by Project Euler 80)
Given a positive integer n which is not a perfect square, write a MATLAB script that will calculate the square root of n truncat...

11ヶ月 前

解決済み


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

11ヶ月 前

解決済み


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

11ヶ月 前

解決済み


Repopulate the City
For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...

12ヶ月 前

解決済み


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

12ヶ月 前

解決済み


Compute the unitary totient of a number
The totient function , the subject of Cody Problems 656 and 50182, gives the number of integers smaller than that are relativel...

12ヶ月 前

解決済み


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

12ヶ月 前

解決済み


Count estrangements
Recently I made a puzzle for my wife that included a cryptogram, which involves an arrangement of the letters A through Z. I use...

12ヶ月 前

さらに読み込む