brain

tamnd's digital brain — notes, problems, research

43815 notes

Project Euler Problem 488

Alice and Bob have enjoyed playing Nim every day.

eulermathematicscompetitive-programming
Project Euler Problem 617

For two integers n,e gt 1, we define an (n,e)-MPS (Mirror Power Sequence) to be an infinite sequence of integers (ai){ig

eulermathematicscompetitive-programming
Project Euler Problem 90

Each of the six faces on a cube has a different digit (0 to 9) written on it; the same is done to a second cube.

eulermathematicscompetitive-programming
Project Euler Problem 549

The smallest number m such that 10 divides m! is m=5.

eulermathematicscompetitive-programming
Project Euler Problem 805

For a positive integer n, let s(n) be the integer obtained by shifting the leftmost digit of the decimal representation

eulermathematicscompetitive-programming
Project Euler Problem 365

The binomial coefficient displaystyle{binom{10^{18}}{10^9}} is a number with more than 9 billion (9times 10^9) digits.

eulermathematicscompetitive-programming
Project Euler Problem 438

For an n-tuple of integers t = (a1, dots, an), let (x1, dots, xn) be the solutions of the polynomial equation x^n + a1 x

eulermathematicscompetitive-programming
Project Euler Problem 334

In Plato's heaven, there exist an infinite number of bowls in a straight line.

eulermathematicscompetitive-programming
Project Euler Problem 504

Let ABCD be a quadrilateral whose vertices are lattice points lying on the coordinate axes as follows: A(a, 0), B(0, b),

eulermathematicscompetitive-programming
Project Euler Problem 574

Let q be a prime and A ge B 0 be two integers with the following properties: - A and B have no prime factor in common, t

eulermathematicscompetitive-programming
Project Euler Problem 197

Given is the function f(x) = lfloor 2^{30.403243784 - x^2}rfloor times 10^{-9} (lfloor rfloor is the floor-function), th

eulermathematicscompetitive-programming
Project Euler Problem 794

This problem uses half open interval notation where [a,b) represents a le x < b.

eulermathematicscompetitive-programming
Project Euler Problem 71

Consider the fraction, dfrac n d, where n and d are positive integers.

eulermathematicscompetitive-programming
Project Euler Problem 785

Consider the following Diophantine equation: where x, y and z are positive integers.

eulermathematicscompetitive-programming
Project Euler Problem 206

Find the unique positive integer whose square has the form 1234567890, where each “” is a single digit.

eulermathematicscompetitive-programming
Project Euler Problem 103

Let S(A) represent the sum of elements in set A of size n.

eulermathematicscompetitive-programming
Project Euler Problem 748

Upside Down is a modification of the famous Pythagorean equation: A solution (x,y,z) to this equation with x,y and z pos

eulermathematicscompetitive-programming
Project Euler Problem 51

By replacing the 1st digit of the 2-digit number 3, it turns out that six of the nine possible values: 13, 23, 43, 53, 7

eulermathematicscompetitive-programming
Project Euler Problem 890

Let p(n) be the number of ways to write n as the sum of powers of two, ignoring order.

eulermathematicscompetitive-programming
Project Euler Problem 760

Define where oplus, vee, wedge are the bitwise XOR, OR and AND operator respectively.

eulermathematicscompetitive-programming
Project Euler Problem 707

Consider a wtimes h grid.

eulermathematicscompetitive-programming
Project Euler Problem 129

A number consisting entirely of ones is called a repunit.

eulermathematicscompetitive-programming
Project Euler Problem 113

Working from left-to-right if no digit is exceeded by the digit to its left it is called an increasing number; for examp

eulermathematicscompetitive-programming
Project Euler Problem 181

Having three black objects B and one white object W they can be grouped in 7 ways like this: | | | | | | | | |--------|-

eulermathematicscompetitive-programming
Project Euler Problem 280

A laborious ant walks randomly on a 5 times 5 grid.

eulermathematicscompetitive-programming
Project Euler Problem 462

A 3-smooth number is an integer which has no prime factor larger than 3.

eulermathematicscompetitive-programming
Project Euler Problem 99

Comparing two numbers written in index form like 2^{11} and 3^7 is not difficult, as any calculator would confirm that 2

eulermathematicscompetitive-programming
Project Euler Problem 304

For any positive integer n the function operatorname{nextprime}(n) returns the smallest prime p such that p gt n.

eulermathematicscompetitive-programming
Project Euler Problem 266

The divisors of 12 are: 1,2,3,4,6 and 12.

eulermathematicscompetitive-programming
Project Euler Problem 671

A certain type of flexible tile comes in three different sizes - 1 times 1, 1 times 2, and 1 times 3 - and in k differen

eulermathematicscompetitive-programming
Project Euler Problem 528

Let S(n, k, b) represent the number of valid solutions to x1 + x2 + cdots + xk le n, where 0 le xm le b^m for all 1 le m

eulermathematicscompetitive-programming
Project Euler Problem 326

Let an be a sequence recursively defined by:quad a1=1,quaddisplaystyle an=biggl(sum{k=1}^{n-1}kcdot akbiggr)bmod n.

eulermathematicscompetitive-programming
Project Euler Problem 248

The first number n for which phi(n)=13! is 6227180929.

eulermathematicscompetitive-programming
Project Euler Problem 641

Consider a row of n dice all showing 1.

eulermathematicscompetitive-programming
Project Euler Problem 877

We use xoplus y for the bitwise XOR of x and y.

eulermathematicscompetitive-programming
Project Euler Problem 211

For a positive integer n, let sigma2(n) be the sum of the squares of its divisors.

eulermathematicscompetitive-programming
Project Euler Problem 485

Let d(n) be the number of divisors of n.

eulermathematicscompetitive-programming
Project Euler Problem 311

ABCD is a convex, integer sided quadrilateral with 1 le AB lt BC lt CD lt AD.

eulermathematicscompetitive-programming
Project Euler Problem 449

Phil the confectioner is making a new batch of chocolate covered candy.

eulermathematicscompetitive-programming
Project Euler Problem 150

In a triangular array of positive and negative integers, we wish to find a sub-triangle such that the sum of the numbers

eulermathematicscompetitive-programming
Project Euler Problem 539

Start from an ordered list of all integers from 1 to n.

eulermathematicscompetitive-programming
Project Euler Problem 494

The Collatz sequence is defined as: a{i+1} = left large{frac {ai} 2 atop 3 ai+1} {text{if }aitext{ is even} atop text{if

eulermathematicscompetitive-programming
Project Euler Problem 92

A number chain is created by continuously adding the square of the digits in a number to form a new number until it has

eulermathematicscompetitive-programming
Project Euler Problem 859

Odd and Even are playing a game with N cookies.

eulermathematicscompetitive-programming
Project Euler Problem 725

A number where one digit is the sum of the other digits is called a digit sum number or DS-number for short.

eulermathematicscompetitive-programming
Project Euler Problem 853

For every positive integer n the Fibonacci sequence modulo n is periodic.

eulermathematicscompetitive-programming
Project Euler Problem 136

The positive integers, x, y, and z, are consecutive terms of an arithmetic progression.

eulermathematicscompetitive-programming
Project Euler Problem 487

Let fk(n) be the sum of the kth powers of the first n positive integers.

eulermathematicscompetitive-programming
Project Euler Problem 397

On the parabola y = x^2/k, three points A(a, a^2/k), B(b, b^2/k) and C(c, c^2/k) are chosen.

eulermathematicscompetitive-programming
Project Euler Problem 130

A number consisting entirely of ones is called a repunit.

eulermathematicscompetitive-programming
Project Euler Problem 118

Using all of the digits 1 through 9 and concatenating them freely to form decimal integers, different sets can be formed

eulermathematicscompetitive-programming
Project Euler Problem 245

We shall call a fraction that cannot be cancelled down a resilient fraction.

eulermathematicscompetitive-programming
Project Euler Problem 355

Define operatorname{Co}(n) to be the maximal possible sum of a set of mutually co-prime elements from 1,2,dots,n.

eulermathematicscompetitive-programming
Project Euler Problem 408

Let's call a lattice point (x, y) inadmissible if x, y and x+y are all positive perfect squares.

eulermathematicscompetitive-programming
Project Euler Problem 380

An m times n maze is an m times n rectangular grid with walls placed between grid cells such that there is exactly one p

eulermathematicscompetitive-programming
Project Euler Problem 795

For a positive integer n, the function g(n) is defined as For example, g(4) = -gcd left(4,1^2right) + gcd left(4,2^2righ

eulermathematicscompetitive-programming
Project Euler Problem 894

Consider a unit circlecircle with radius 1 C0 on the plane that does not enclose the origin.

eulermathematicscompetitive-programming
Project Euler Problem 514

A geoboard (of order N) is a square board with equally-spaced pins protruding from the surface, representing an integer

eulermathematicscompetitive-programming
Project Euler Problem 131

There are some prime values, p, for which there exists a positive integer, n, such that the expression n^3 + n^2p is a p

eulermathematicscompetitive-programming
Project Euler Problem 834

A sequence is created by starting with a positive integer n and incrementing by (n+m) at the m^{th} step.

eulermathematicscompetitive-programming
Project Euler Problem 775

When wrapping several cubes in paper, it is more efficient to wrap them all together than to wrap each one individually.

eulermathematicscompetitive-programming
Project Euler Problem 467

An integer s is called a superinteger of another integer n if the digits of n form a subsequenceA subsequence is a seque

eulermathematicscompetitive-programming
Project Euler Problem 797

A monic polynomial is a single-variable polynomial in which the coefficient of highest degree is equal to 1.

eulermathematicscompetitive-programming
Project Euler Problem 782

The complexity of an ntimes n binary matrix is the number of distinct rows and columns.

eulermathematicscompetitive-programming
Project Euler Problem 830

Let displaystyle S(n)=sumlimits{k=0}^{n}binom{n}{k}k^n.

eulermathematicscompetitive-programming
Project Euler Problem 431

Fred the farmer arranges to have a new storage silo installed on his farm and having an obsession for all things square

eulermathematicscompetitive-programming
Project Euler Problem 370

Let us define a geometric triangle as an integer sided triangle with sides a le b le c so that its sides form a geometri

eulermathematicscompetitive-programming
Project Euler Problem 377

There are 16 positive integers that do not have a zero in their digits and that have a digital sum equal to 5, namely: 5

eulermathematicscompetitive-programming
Project Euler Problem 241

For a positive integer n, let sigma(n) be the sum of all divisors of n.

eulermathematicscompetitive-programming
Project Euler Problem 66

Consider quadratic Diophantine equations of the form: For example, when D=13, the minimal solution in x is 649^2 - 13 ti

eulermathematicscompetitive-programming
Project Euler Problem 201

For any set A of numbers, let operatorname{sum}(A) be the sum of the elements of A.

eulermathematicscompetitive-programming
Project Euler Problem 841

The regular star polygon p/q, for coprime integers p,q with p gt 2q gt 0, is a polygon formed from p edges of equal leng

eulermathematicscompetitive-programming
Project Euler Problem 843

This problem involves an iterative procedure that begins with a circle of nge 3 integers.

eulermathematicscompetitive-programming
Project Euler Problem 417

A unit fraction contains 1 in the numerator.

eulermathematicscompetitive-programming
Project Euler Problem 546

Define fk(n) = sum{i=0}^n fk(lfloorfrac i k rfloor) where fk(0) = 1 and lfloor x rfloor denotes the floor function.

eulermathematicscompetitive-programming
Project Euler Problem 854

For every positive integer n the Fibonacci sequence modulo n is periodic.

eulermathematicscompetitive-programming
Project Euler Problem 480

Consider all the words which can be formed by selecting letters, in any order, from the phrase: thereisasyetinsufficient

eulermathematicscompetitive-programming
Project Euler Problem 356

Let an be the largest real root of a polynomial g(x) = x^3 - 2^n cdot x^2 + n.

eulermathematicscompetitive-programming
Project Euler Problem 884

Starting from a positive integer n, at each step we subtract from n the largest perfect cube not exceeding n, until n be

eulermathematicscompetitive-programming
Project Euler Problem 373

Every triangle has a circumscribed circle that goes through the three vertices.

eulermathematicscompetitive-programming
Project Euler Problem 544

Let F(r, c, n) be the number of ways to colour a rectangular grid with r rows and c columns using at most n colours such

eulermathematicscompetitive-programming
Project Euler Problem 310

Alice and Bob play the game Nim Square.

eulermathematicscompetitive-programming
Project Euler Problem 573

n runners in very different training states want to compete in a race.

eulermathematicscompetitive-programming
Project Euler Problem 393

An n times n grid of squares contains n^2 ants, one ant per square.

eulermathematicscompetitive-programming
Project Euler Problem 385

For any triangle T in the plane, it can be shown that there is a unique ellipse with largest area that is completely ins

eulermathematicscompetitive-programming
Project Euler Problem 121

A bag contains one red disc and one blue disc.

eulermathematicscompetitive-programming
Project Euler Problem 591

Given a non-square integer d, any real x can be approximated arbitrarily close by quadratic integers a+bsqrt{d}, where a

eulermathematicscompetitive-programming
Project Euler Problem 593

We define two sequences S = S(1), S(2), ..., S(n) and S2 = S2(1), S2(2), ..., S2(n): S(k) = (pk)^k bmod 10007 where pk i

eulermathematicscompetitive-programming
Project Euler Problem 495

Let W(n,k) be the number of ways in which n can be written as the product of k distinct positive integers.

eulermathematicscompetitive-programming
Project Euler Problem 239

A set of disks numbered 1 through 100 are placed in a line in random order.

eulermathematicscompetitive-programming
Project Euler Problem 691

Given a character string s, we define L(k,s) to be the length of the longest substring of s which appears at least k tim

eulermathematicscompetitive-programming
Project Euler Problem 827

Define Q(n) to be the smallest number that occurs in exactly n Pythagorean triples (a,b,c) where a lt b lt c.

eulermathematicscompetitive-programming
Project Euler Problem 740

Secret Santa is a process that allows n people to give each other presents, so that each person gives a single present a

eulermathematicscompetitive-programming
Project Euler Problem 540

A Pythagorean triple consists of three positive integers a, b and c satisfying a^2+b^2=c^2.

eulermathematicscompetitive-programming
Project Euler Problem 115

NOTE: This is a more difficult version of Problem 114.

eulermathematicscompetitive-programming
Project Euler Problem 820

Let dn(x) be the nth decimal digit of the fractional part of x, or 0 if the fractional part has fewer than n digits.

eulermathematicscompetitive-programming
Project Euler Problem 700

Leonhard Euler was born on 15 April 1707.

eulermathematicscompetitive-programming
Project Euler Problem 810

We use xoplus y for the bitwise XOR of x and y.

eulermathematicscompetitive-programming
Project Euler Problem 218

Consider the right angled triangle with sides a=7, b=24 and c=25.

eulermathematicscompetitive-programming
Project Euler Problem 804

Let g(n) denote the number of ways a positive integer n can be represented in the form: where x and y are integers.

eulermathematicscompetitive-programming