Solved


Project Euler Problem 48: Self Powers
The series,. Return a string of the last ten digits of the series:. Hint: Use modular arithmetic! Spoiler: The solution is...

1 month ago

Solved


Check if a Number is a Palindrome Without Converting to String
Write a function that checks if a given positive integer is a palindrome without converting the number to a string or using stri...

1 month ago

Solved


Greater than before
Given an array of integers, write a function that returns elements that are greater than the one before them. For instance, ...

1 month ago

Solved


Symmetric Pair
Given an (n, 2) matrix, remove any symmetric pairs from the matrix. Keep the first occurrence. (2, 3) and (3, 2) are considere...

1 month ago

Solved


Most Frequent Characters
Given a document file or a character array, identify the 'n' most frequently occurring characters and the number of times each a...

1 month ago

Solved


First Duplicate
Given an array of integers, return the first duplicate — i.e., the element that appears more than once and whose second appearan...

1 month ago

Solved


Last Duplicate
Given an array of integers, find the last duplicate element — that is, the element whose second occurrence appears latest in the...

1 month ago

Solved


Compute the antisigma function
The sum of divisors function, or , is the sum of the numbers that divide . The antisigma function is the sum of numbers less tha...

1 month ago

Solved


Classify triangles as acute, obtuse, or right
In an acute triangle, the three interior angles are acute, or smaller than 90 degrees. In an obtuse triangle, one angle is obtus...

1 month ago

Solved


Compile evidence for the Carmichael totient conjecture
The totient function counts the positive integers up to that are relatively prime to . The Carmichael totient conjecture state...

1 month ago

Solved


Find the longest runs of primes generated by polynomials
Cody Problems 60942, 60943, and 60944 involve polynomials that generate primes. No polynomial can generate only prime numbers, b...

1 month ago

Solved


List even numbers whose Goldbach partition does not use the largest prime
The strong Goldbach conjecture says that every even number greater than 2 can be expressed as a sum of two prime numbers—that is...

1 month ago

Solved


List mean-of-2 primes
The prime number 53 is the average of the first prime before it (47) and the first prime after it (59), and the prime number 11 ...

1 month ago

Solved


Chek the Delta = p' - p = 6k gap theorem about arithmetic progressions in the prime number set
Context In the prime numbers set there are some arithmetic progressions (sequences of three or more consecutive prime number...

1 month ago

Solved


Evaluate Deterministic Finite Automata on String
Given a Deterministic Finite Automata (DFA) and a string, determine whether or not the DFA will accept when ran on the string. A...

1 month ago

Solved


List the near-square primes, p = n² + 1 (Landau's 4th problem)
Historical context At the 1912 International Congress of Mathematicians, Edmund Landau listed four basic problems about prime...

1 month ago

Solved


List primes which are the sum of two consecutive lower primes plus minus one
Problem statement Some prime numbers can be written as the sum of two consecutive lower primes plus / minus one : Like t...

1 month ago

Solved


Monkey and the Peaches
A monkey picked a certain number of peaches on the first day. Each day, the monkey eats half of the remaining peaches plus one ...

1 month ago

Solved


Check p = 4n +/- 1, the generic formula for odd prime numbers
Problem statement For all odd prime number p, there exists a positive integer n, such that p = 4n +/- 1 : Check this f...

1 month ago

Solved


Check p = 6n +/- 1, the generic formula for odd prime numbers greater than 3
Problem statement For all odd prime number p greater than 3, there exists a positive integer n, such that p = 6n +/- 1 : ...

1 month ago

Solved


Check Bertrand-Chebyshev's theorem about prime numbers
Historical context Bertrand's postulate, also later known as Chebyshev's theorem, is a very important theorem in number theory ...

1 month ago

Solved


List the twin prime couples
Problem statement The twin prime couples (p,p') are the ones such that p' = p + 2. For a given integer n > 1, list the twin p...

1 month ago

Solved


Check Legendre's conjecture
Context and problem statement Legendre's conjecture states for a given positive integer n, there always exists at least one pri...

1 month ago

Solved


List the complementary / symetric prime couples
Problem statement For a given positive integer n, provide the prime couples (p,p') such that p + p' = 10^n. NB : a number li...

1 month ago

Solved


Linear primes p' = mp + n
Problem statement List the prime numbers of the form p' = mp + n for a given (m,n) couple and such that p' < k, k positive in...

1 month ago

Solved


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

1 month ago

Solved


q-dimensional Cartesian product
Your mission, should you choose to accept it, is to compute a q-dimensional Cartesian product, as follows. Let the input G be an...

1 month ago

Solved


Compute the tersum
The tersum, which appears in certain mathematical games, involves adding two numbers in base 3 without carry and converting back...

1 month ago

Solved


Moving Movsum
Given a vector (x) and a window (y), calculate the sum s(k) corresponding to k-y(k)+1:k values of x %%Example 1 x = [1 2 3 4...

1 month ago

Solved


Enclosure Matrix
The problem gives you a positive integer n. You need to create a matrix consisting of n layers of natural numbers; the outermost...

1 month ago

Load more