Solved


Project Euler 249: Prime Subset Sums
Inspired by Problem 249 of Project Euler. <https://projecteuler.net/problem=249> Let S = {2, 3, 5, ...} be the set of prime ...

10 days ago

Solved


Bouncy numbers
Inspired by Project Euler n°112. Working from left-to-right if no digit is exceeded by the digit to its left it is called an ...

10 days ago

Solved


Count the even numbers in a multiplication table
A multiplication table that has products of numbers from 1 to 10 has 75 even numbers among the products. Write a function to c...

12 days ago

Solved


List lunar triangular numbers without duplication
Triangular numbers—which are the subject of Cody Problems 5, 291, 44289, 44732, 45833, 55680, 55695, and 55705—are the sums of c...

12 days ago

Solved


Spell musical triads
Chords form the basis of harmony in music. The most basic chords are triads, or groups of three notes. They are specified by thr...

12 days ago

Solved


Lunar Arithmetic (Multiplication)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit when adding and take ...

12 days ago

Solved


Expand 10^n to Powers of 4
Given an integer n, return the coefficients c = [c_n,c_n-1,...,c_0] Such that 10^n = c_n*4^(n) + c_n-1*4^(n-1...

12 days ago

Solved


TRON strategy toggle
Detect whether your lightcycle is on same side of existing walls as opponents lightcycle. This function is useful in toggling a ...

12 days ago

Solved


Deduce Equations for Simplified Interstellar Doppler Effect ✨
R2-D2 and C-3PO are friends. R2-D2 boards a spacecraft bound to a galaxy far, far away, but is always in contact with C-3PO, als...

12 days ago

Solved


Compute the fractional derivative
Cody Problem 1370 asks us to compute the derivative of a polynomial. This problem extends that idea to fractional derivatives, w...

12 days ago

Solved


Estimate π from certain values of the zeta function
Cody Problems <https://www.mathworks.com/matlabcentral/cody/problems/2908-approximation-of-pi 2908> and <https://www.mathworks.c...

12 days ago

Solved


Compute the sum of reciprocals of quadratics
Write a function to compute the following sum: See also Cody Problem 46000.

12 days ago

Solved


Compute the period of a pendulum started from a finite initial angle
Cody Problem 49830 asks for the period of a pendulum swinging through a small angle. Here the pendulum started at rest from an ...

12 days ago

Solved


Evaluate the generalized hypergeometric function
The <https://en.wikipedia.org/wiki/Generalized_hypergeometric_function generalized hypergeometric function> is defined as <<...

12 days ago

Solved


Even Logic. Instant Results
Write a MATLAB function isEven(n) that takes an integer n as input and returns true if the number is even, and false if it is od...

13 days ago

Solved


Given a Matrix add a frame of 0's to it
for x as the input = [ 8 7 9 8 2 4 3 2 6 7 5 3] then output y sould be = out=[0 0 0 0 0 ...

13 days ago

Solved


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

13 days ago

Solved


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

13 days ago

Solved


Compute a sum of Ramanujan
Srinivasa Ramanujan defined the following function: Write a function to compute for various values of . See also Cody Proble...

13 days ago

Solved


Compute a sum
Write a function to compute the following sum Although a solution is available for general values of the coefficients, the co...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 8
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 7
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 6
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 5
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 4
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 3
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 2
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud on an equilateral triangle 1
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

13 days ago

Solved


Generate a point cloud named `Incremental Lattice Design`
The input is the number of dimensions M and the parameter H. The output is a point cloud W involving N points. W is N uniforml...

13 days ago

Load more