A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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

12 jours il y a

A résolu


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 jours il y a

A résolu


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

12 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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

13 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

A résolu


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 jours il y a

Charger plus