brain

tamnd's digital brain — notes, problems, research

42715 notes

Project Euler Problem 654

Let T(n, m) be the number of m-tuples of positive integers such that the sum of any two neighbouring elements of the tup

eulermathematicscompetitive-programming
Project Euler Problem 345

We define the Matrix Sum of a matrix as the maximum possible sum of matrix elements such that none of the selected eleme

eulermathematicscompetitive-programming
Project Euler Problem 788

A dominating number is a positive integer that has more than half of its digits equal.

eulermathematicscompetitive-programming
Project Euler Problem 864

Let C(n) be the number of squarefree integers of the form x^2 + 1 such that 1 le x le n.

eulermathematicscompetitive-programming
Project Euler Problem 309

In the classic "Crossing Ladders" problem, we are given the lengths x and y of two ladders resting on the opposite walls

eulermathematicscompetitive-programming
Project Euler Problem 586

The number 209 can be expressed as a^2 + 3ab + b^2 in two distinct ways: qquad 209 = 8^2 + 3cdot 8cdot 5 + 5^2 qquad 209

eulermathematicscompetitive-programming
Project Euler Problem 347

The largest integer le 100 that is only divisible by both the primes 2 and 3 is 96, as 96=32times 3=2^5 times 3.

eulermathematicscompetitive-programming
Project Euler Problem 837

Amidakuji (Japanese: 阿弥陀籤) is a method for producing a random permutation of a set of objects.

eulermathematicscompetitive-programming
Project Euler Problem 293

An even positive integer N will be called admissible, if it is a power of 2 or its distinct prime factors are consecutiv

eulermathematicscompetitive-programming
Project Euler Problem 836

Let A be an affine plane over a radically integral local field F with residual characteristic p.

eulermathematicscompetitive-programming
Project Euler Problem 482

ABC is an integer sided triangle with incenter I and perimeter p.

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 80

It is well known that if the square root of a natural number is not an integer, then it is irrational.

eulermathematicscompetitive-programming
Project Euler Problem 164

How many 20 digit numbers n (without any leading zero) exist such that no three consecutive digits of n have a sum great

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 636

Consider writing a natural number as product of powers of natural numbers with given exponents, additionally requiring d

eulermathematicscompetitive-programming
Project Euler Problem 695

Three points, P1, P2 and P3, are randomly selected within a unit square.

eulermathematicscompetitive-programming
Project Euler Problem 707

Consider a wtimes h grid.

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 469

In a room N chairs are placed around a round table.

eulermathematicscompetitive-programming
Project Euler Problem 610

A random generator produces a sequence of symbols drawn from the set {I, V, X, L, C, D, M, }.

eulermathematicscompetitive-programming
Project Euler Problem 808

Both 169 and 961 are the square of a prime.

eulermathematicscompetitive-programming
Project Euler Problem 601

For every positive number n we define the function mathop{streak}(n)=k as the smallest positive integer k such that n+k

eulermathematicscompetitive-programming
Project Euler Problem 637

Given any positive integer n, we can construct a new integer by inserting plus signs between some of the digits of the b

eulermathematicscompetitive-programming
Project Euler Problem 532

Bob is a manufacturer of nanobots and wants to impress his customers by giving them a ball coloured by his new nanobots

eulermathematicscompetitive-programming
Project Euler Problem 123

Let pn be the nth prime: 2, 3, 5, 7, 11, dots, and let r be the remainder when (pn - 1)^n + (pn + 1)^n is divided by pn^

eulermathematicscompetitive-programming
Project Euler Problem 153

As we all know the equation x^2=-1 has no solutions for real x.

eulermathematicscompetitive-programming
Project Euler Problem 785

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

eulermathematicscompetitive-programming
Project Euler Problem 700

Leonhard Euler was born on 15 April 1707.

eulermathematicscompetitive-programming
Project Euler Problem 511

Let Seq(n,k) be the number of positive-integer sequences ai{1 le i le n} of length n such that: - n is divisible by ai f

eulermathematicscompetitive-programming
Project Euler Problem 174

We shall define a square lamina to be a square outline with a square "hole" so that the shape possesses vertical and hor

eulermathematicscompetitive-programming
Project Euler Problem 315

!0315clocks.gif Sam and Max are asked to transform two digital clocks into two "digital root" clocks.

eulermathematicscompetitive-programming
Project Euler Problem 193

A positive integer n is called squarefree, if no square of a prime divides n, thus 1, 2, 3, 5, 6, 7, 10, 11 are squarefr

eulermathematicscompetitive-programming
Project Euler Problem 49

The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) eac

eulermathematicscompetitive-programming
Project Euler Problem 731

Define A(n) to be the 10 decimal digits from the nth digit onward.

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 537

Let pi(x) be the prime counting function, i.e.

eulermathematicscompetitive-programming
Project Euler Problem 460

On the Euclidean plane, an ant travels from point A(0, 1) to point B(d, 1) for an integer d.

eulermathematicscompetitive-programming
Project Euler Problem 729

Consider the sequence of real numbers an defined by the starting value a0 and the recurrence displaystyle a{n+1}=an-frac

eulermathematicscompetitive-programming
Project Euler Problem 204

A Hamming number is a positive number which has no prime factor larger than 5.

eulermathematicscompetitive-programming
Project Euler Problem 825

Two cars are on a circular track of total length 2n, facing the same direction, initially distance n apart.

eulermathematicscompetitive-programming
Project Euler Problem 751

A non-decreasing sequence of integers an can be generated from any positive real value theta by the following procedure:

eulermathematicscompetitive-programming
Project Euler Problem 703

Given an integer n, n geq 3, let B=mathrm{false},mathrm{true} and let B^n be the set of sequences of n values from B.

eulermathematicscompetitive-programming
Project Euler Problem 85

By counting carefully it can be seen that a rectangular grid measuring 3 by 2 contains eighteen rectangles: Although the

eulermathematicscompetitive-programming
Project Euler Problem 394

Jeff eats a pie in an unusual way.

eulermathematicscompetitive-programming
Project Euler Problem 543

Define function P(n, k) = 1 if n can be written as the sum of k prime numbers (with repetitions allowed), and P(n, k) =

eulermathematicscompetitive-programming
Project Euler Problem 590

Let H(n) denote the number of sets of positive integers such that the least common multiple of the integers in the set e

eulermathematicscompetitive-programming
Project Euler Problem 570

A snowflake of order n is formed by overlaying an equilateral triangle (rotated by 180 degrees) onto each equilateral tr

eulermathematicscompetitive-programming
Project Euler Problem 585

Consider the term small sqrt{x+sqrt{y}+sqrt{z}} that is representing a nested square root.

eulermathematicscompetitive-programming
Project Euler Problem 856

A standard 52-card deck comprises 13 ranks in four suits.

eulermathematicscompetitive-programming
Project Euler Problem 569

A mountain range consists of a line of mountains with slopes of exactly 45^circ, and heights governed by the prime numbe

eulermathematicscompetitive-programming
Project Euler Problem 416

A row of n squares contains a frog in the leftmost square.

eulermathematicscompetitive-programming
Project Euler Problem 191

A particular school offers cash rewards to children with good attendance and punctuality.

eulermathematicscompetitive-programming
Project Euler Problem 143

Let ABC be a triangle with all interior angles being less than 120 degrees.

eulermathematicscompetitive-programming
Project Euler Problem 876

Starting with three numbers a, b, c, at each step do one of the three operations: - change a to 2(b + c) - a; - change b

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 616

Alice plays the following game, she starts with a list of integers L and on each step she can either: - remove two eleme

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 651

An infinitely long cylinder has its curved surface fully covered with different coloured but otherwise identical rectang

eulermathematicscompetitive-programming
Project Euler Problem 692

Siegbert and Jo take turns playing a game with a heap of N pebbles: 1.

eulermathematicscompetitive-programming
Project Euler Problem 717

For an odd prime p, define f(p) = leftlfloorfrac{2^{(2^p)}}{p}rightrfloorbmod{2^p} For example, when p=3, lfloor 2^8/3rf

eulermathematicscompetitive-programming
Project Euler Problem 454

In the following equation x, y, and n are positive integers.

eulermathematicscompetitive-programming
Project Euler Problem 562

Construct triangle ABC such that: - Vertices A, B and C are lattice points inside or on the circle of radius r centered

eulermathematicscompetitive-programming
Project Euler Problem 798

Two players play a game with a deck of cards which contains s suits with each suit containing n cards numbered from 1 to

eulermathematicscompetitive-programming
Project Euler Problem 262

The following equation represents the continuous topography of a mountainous region, giving the elevationheight above se

eulermathematicscompetitive-programming
Project Euler Problem 165

A segment is uniquely defined by its two endpoints.

eulermathematicscompetitive-programming
Project Euler Problem 844

Consider positive integer solutions to a^2+b^2+c^2 = 3abc For example, (1,5,13) is a solution.

eulermathematicscompetitive-programming
Project Euler Problem 112

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 379

Let f(n) be the number of couples (x, y) with x and y positive integers, x le y and the least common multiple of x and y

eulermathematicscompetitive-programming
Project Euler Problem 222

What is the length of the shortest pipe, of internal radius pu{50 mm}, that can fully contain 21 balls of radii pu{30 mm

eulermathematicscompetitive-programming
Project Euler Problem 95

The proper divisors of a number are all the divisors excluding the number itself.

eulermathematicscompetitive-programming
Project Euler Problem 391

Let sk be the number of 1’s when writing the numbers from 0 to k in binary.

eulermathematicscompetitive-programming
Project Euler Problem 333

All positive integers can be partitioned in such a way that each and every term of the partition can be expressed as 2^i

eulermathematicscompetitive-programming
Project Euler Problem 292

We shall define a pythagorean polygon to be a convex polygon with the following properties: - there are at least three v

eulermathematicscompetitive-programming
Project Euler Problem 70

Euler's totient function, phi(n) [sometimes called the phi function], is used to determine the number of positive number

eulermathematicscompetitive-programming
Project Euler Problem 728

Consider n coins arranged in a circle where each coin shows heads or tails.

eulermathematicscompetitive-programming
Project Euler Problem 323

Let y0, y1, y2, dots be a sequence of random unsigned 32-bit integers (i.e.

eulermathematicscompetitive-programming
Project Euler Problem 513

ABC is an integral sided triangle with sides a le b le c.

eulermathematicscompetitive-programming
Project Euler Problem 555

The McCarthy 91 function is defined as follows: We can generalize this definition by abstracting away the constants into

eulermathematicscompetitive-programming
Project Euler Problem 209

A k-input binary truth table is a map from k input bits (binary digits, 0 [false] or 1 [true]) to 1 output bit.

eulermathematicscompetitive-programming
Project Euler Problem 571

A positive number is pandigital in base b if it contains all digits from 0 to b - 1 at least once when written in base b

eulermathematicscompetitive-programming
Project Euler Problem 351

A hexagonal orchard of order n is a triangular lattice made up of points within a regular hexagon with side n.

eulermathematicscompetitive-programming
Project Euler Problem 167

For two positive integers a and b, the Ulam sequence U(a,b) is defined by U(a,b)1 = a, U(a,b)2 = b and for k gt 2, U(a,b

eulermathematicscompetitive-programming
Project Euler Problem 736

Define two functions on lattice points: r(x,y) = (x+1,2y) s(x,y) = (2x,y+1) A path to equality of length n for a pair (a

eulermathematicscompetitive-programming
Project Euler Problem 816

We create an array of points Pn in a two dimensional plane using the following random number generator: s0=290797 s{n+1}

eulermathematicscompetitive-programming
Project Euler Problem 314

The moon has been opened up, and land can be obtained for free, but there is a catch.

eulermathematicscompetitive-programming
Project Euler Problem 458

Consider the alphabet A made out of the letters of the word "text{project}": A=text c,text e,text j,text o,text p,text r

eulermathematicscompetitive-programming
Project Euler Problem 404

Ea is an ellipse with an equation of the form x^2 + 4y^2 = 4a^2.

eulermathematicscompetitive-programming
Project Euler Problem 169

Define f(0)=1 and f(n) to be the number of different ways n can be expressed as a sum of integer powers of 2 using each

eulermathematicscompetitive-programming
Project Euler Problem 344

One variant of N.G. de Bruijn's silver dollar game can be described as follows: On a strip of squares a number of coins

eulermathematicscompetitive-programming
Project Euler Problem 786

The following diagram shows a billiard table of a special quadrilateral shape.

eulermathematicscompetitive-programming
Project Euler Problem 251

A triplet of positive integers (a, b, c) is called a Cardano Triplet if it satisfies the condition: For example, (2,1,5)

eulermathematicscompetitive-programming
Project Euler Problem 811

Let b(n) be the largest power of 2 that divides n.

eulermathematicscompetitive-programming
Project Euler Problem 947

The (a,b,m)-sequence, where 0 leq a,b lt m, is defined as $begin{align} g(0)&=a g(1)&=b g(n)&= big(g(n-1) + g(n-2)big) b

eulermathematicscompetitive-programming
Project Euler Problem 119

The number 512 is interesting because it is equal to the sum of its digits raised to some power: 5 + 1 + 2 = 8, and 8^3

eulermathematicscompetitive-programming
Project Euler Problem 417

A unit fraction contains 1 in the numerator.

eulermathematicscompetitive-programming
Project Euler Problem 301

Nim is a game played with heaps of stones, where two players take it in turn to remove any number of stones from any hea

eulermathematicscompetitive-programming
Project Euler Problem 568

Tom has built a random generator that is connected to a row of n light bulbs.

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 771

We define a pseudo-geometric sequence to be a finite sequence a0, a1, dotsc, an of positive integers, satisfying the fol

eulermathematicscompetitive-programming