Location via proxy:   
[Report a bug]   [Manage cookies]                

Online Lemoine’s Conjecture Demo in Go

2n + 1 = p + 2q always has a solution in primes p and q (not necessarily distinct) for n > 2. This online demo finds p and q for given odd number greater than 5. The demo is written in Go and compiled to JavaScript using GopherJS.

 read more »

Lemoine’s Conjecture

2n + 1 = p + 2q always has a solution in primes p and q (not necessarily distinct) for n > 2. Write a Go program to find p and q for given odd number greater than 5.

 read more »

[Golang] Get Instagram User ID

Given user name, get Instagram user id via Go programming language. Use only Go standard library and no third-party packages needed.

 read more »

Descartes' rules of signs

Hard to believe that I don't remember seeing Descartes' rules of signs before -- you'd think this is impossible given the time I spent on ...

 read more »

Radon's theorem

I came across Radon's theorem the other day, and found this proof. It must have been discovered before.

 read more »

Frontend Programming in Go

Discuss why I choose Go to be my frontend programming language. Wirte Go code and run your application on web browsers.

 read more »

Count spread in O(n)

This is not hard but still interesting. A spread of an array of numbers is the difference between its maximum and minimum. Given an array...

 read more »

Balancing numbers

There are 2n+1 coins each associated with a weight. When we remove any coin, we can split the rest into two piles each with n coins...

 read more »

No crossing!

On the 2D plane there are (n) blue and (n) red points, no three of them are co-linear. Then we can always pair a blue point with a red ...

 read more »

[Golang] Goldbach's conjecture

Goldbach's conjecture - Every even integer greater than 2 can be written as the sum of two primes. Given a positive even integer, write a Go program to find the two primes.

 read more »

[Dart] Modal (Popup)

Modal (Popup) implementation via Dart and CSS. Modal is dialog box/popup window that is displayed on top of the current page.

 read more »

2017 APMO Problem 3

Let (A(n)) denote the number of sequences (a_1ge a_2gecdots{}ge a_k) of positive integers for which (a_1+cdots+a_k = n) and each ...

 read more »

APMO 2017 Problem 1

We call a (5)-tuple of integers arrangeable if its elements can be labeled (a, b, c, d, e) in some order so that (a-b+c-d+e=29). Deter...

 read more »

[Vue.js] Modal (Popup)

Modal (Popup) implementation via Vue.js and CSS. Modal is dialog box/popup window that is displayed on top of the current page.

 read more »

[Vue.js] HTML Select Element Example

Use Vue.js to manipulate HTML select element. First show how to use v-model directive to create data bindings for select element. Then use the selected option to make some animation via animate.css.

 read more »

2009 USAMO Problem 3

I found a different solution to the second part of this problem. We define a chessboard polygon to be a polygon whose edges are situate...

 read more »

USAMO 2017 Problem 2

Let (m_1, m_2, ldots, m_n) be a collection of (n) positive integers, not necessarily distinct. For any sequence of integers (A = (a_1...

 read more »

USAMO 2008 Problem 3

The problem is rephrased. Q: A diamond of size n consists of 2n rows of nodes with lengths from top to bottom being 1, 3, 5, ..., 2n-1...

 read more »

USAMO 2017 Problem 4

Let (P_1, P_2, dots, P_{2n}) be (2n) distinct points on the unit circle (x^2+y^2=1), other than ((1,0)). Each point is colored eit...

 read more »

[Golang] BK-tree Data Structure Implementation

Go implementation of BK-tree data structure used for approximate string matching in a dictionary. The distance metric here is Levenshtein distance, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.

 read more »

[Golang] Levenshtein Distance Recursive Implementation

Recursive implementation of Levenshtein distance algorithm in Go programming language. Levenshtein distance (LD) is a measure of the similarity between two strings, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.

 read more »

IMO 2007 Problem 3

In a mathematical competition some competitors are friends. Friendship is always mutual. Call a group of competitors a clique if each two of...

 read more »

The 13 laws of Karma That Will Change Your Life

What you have done unto others in past lives or in this one (cause), weaves the karmic agreement of your present and future (effect). Whatever one puts out into the Universe will come back to them. As you sow, so shall you reap.

 read more »

IMO 2016 Problem 6

There are n>=2 line segments in the plane such that every two segments cross and no three segments meet at a point. Geoff has to choose an ...

 read more »

[Algorithm] Magical Recurrence

In a recent algorithmic coding contest which I didn't do well, the hardest problem killed me. It distinguished me from other superior coders. But it's still an interesting one. The problem is essentially to solve a 0/1 knapsack problem on a tree where each node is associated with an …

 read more »

The Four Principles of Indian Spirituality

“Whomsoever you encounter is the right one.”, “Whatever happened is the only thing that could have happened.”, “Each moment in which something begins is the right moment.”, “What is over, is over.”

 read more »