Resuelto


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

5 meses hace

Resuelto


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

5 meses hace

Resuelto


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

5 meses hace

Resuelto


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

5 meses hace

Resuelto


Largest Geometric Series
Extension of Ned Gulley's wonderful Problem 317. In a geometric series, ratio of adjacent elements is always a constant value. ...

5 meses hace

Resuelto


Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

5 meses hace

Resuelto


Golomb's self-describing sequence (based on Euler 341)
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

5 meses hace

Resuelto


Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

5 meses hace

Resuelto


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

5 meses hace

Resuelto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

5 meses hace

Resuelto


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

6 meses hace

Resuelto


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

6 meses hace

Resuelto


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of Kolakoski Sequence.

6 meses hace

Resuelto


Air Mass to Star for an Observer at Mean Sea Level
Air mass is a measure of how much atmosphere light from a source above the atmosphere (eg sun, planet, star) has to travel throu...

6 meses hace

Resuelto


Translating even-degree polynomial by its vertex to the origin
Let p be an even-degree polynomial such that has a unique vertex (single global extremum). Consider its translation by shifting ...

6 meses hace

Resuelto


Shifting vertically a function's graph
Given a real function, f, by n input-output pairs, consider a translation in the up-down direction given by an amount k. For a ...

6 meses hace

Resuelto


Translating parabola by its vertex to the origin
Given a quadratic polynomial, p(x) = ax^2 + bx + c (a ~= 0), represented by the vector [a b c], consider the translation of the ...

6 meses hace

Resuelto


Hình chữ nhật lớn nhất trong biểu đồ Histogram
Cho một mảng các số nguyên heights biểu thị chiều cao của các cột trong biểu đồ tần số, trong đó chiều rộng của mỗi cột là 1, hã...

6 meses hace

Resuelto


Breaking straight lines
Let P be a point in Oxy plane and let p be a 1×2 array representing an one-degree or zero-degree polynomials, if its first entry...

6 meses hace

Resuelto


Jump Game
Bạn được cho một mảng số nguyên nums. Ban đầu bạn được đặt ở vị trí chỉ mục đầu tiên của mảng, và mỗi phần tử trong mảng biểu th...

6 meses hace

Resuelto


Find nth triangular number.
Calculate the triangular number of given integer n.

6 meses hace

Resuelto


Leo Bậc Thang
Bạn đang leo cầu thang. Cần n bước để lên đến đỉnh. Mỗi lần bạn có thể leo 1 hoặc 2 bước. Hỏi có bao nhiêu cách khác nhau để le...

6 meses hace

Resuelto


Find record values in a sequence
Write a function to find the record values in a sequence—that is, the largest values seen since the start. For example, if the s...

6 meses hace

Resuelto


Polarisation
You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

6 meses hace

Resuelto


Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

6 meses hace

Resuelto


Comparing to scale all terms versus one term of even-degree polynomial by the same scale factor
Let p be an even-degree polynomial with positive leading coefficient. Consider the scale factor, k, that vertically transforms ...

6 meses hace

Resuelto


Gather primes
A book titled Gather that I regularly see inspired this game: make as many words as possible from the letters in the word GATHER...

6 meses hace

Resuelto


Shifting vertically even-degree polynomial's graph by its mean over an interval
Let p be an even-degree polynomial with positive leading coefficient. Consider its vertical translation by shifting its graph by...

6 meses hace

Resuelto


Scaling vertically functions
Given a real function by the 1×n array, x, of inputs and the 1×n array, y, of outputs, consider shifting vertically its graph by...

6 meses hace

Resuelto


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

6 meses hace

Cargar más