Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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

6 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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

6 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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

6 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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 months ago

Solved


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

6 months ago

Load more