brain

tamnd's digital brain — notes, problems, research

43815 notes

Project Euler Problem 826

Consider a wire of length 1 unit between two posts.

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

On a chess board, a centaur moves like a king or a knight.

eulermathematicscompetitive-programming
Project Euler Problem 533

The Carmichael function lambda(n) is defined as the smallest positive integer m such that a^m = 1 modulo n for all integ

eulermathematicscompetitive-programming
Project Euler Problem 436

Julie proposes the following wager to her sister Louise.

eulermathematicscompetitive-programming
Project Euler Problem 643

Two positive integers a and b are 2-friendly when gcd(a,b) = 2^t, t gt 0.

eulermathematicscompetitive-programming
Project Euler Problem 221

We shall call a positive integer A an "Alexandrian integer", if there exist integers p, q, r such that: and For example,

eulermathematicscompetitive-programming
Project Euler Problem 249

Let S = 2, 3, 5, dots, 4999 be the set of prime numbers less than 5000.

eulermathematicscompetitive-programming
Project Euler Problem 819

Given an n-tuple of numbers another n-tuple is created where each element of the new n-tuple is chosen randomly from the

eulermathematicscompetitive-programming
Project Euler Problem 628

A position in chess is an (orientated) arrangement of chess pieces placed on a chessboard of given size.

eulermathematicscompetitive-programming
Project Euler Problem 584

A long long time ago in a galaxy far far away, the Wimwians, inhabitants of planet WimWi, discovered an unmanned drone t

eulermathematicscompetitive-programming
Project Euler Problem 185

The game Number Mind is a variant of the well known game Master Mind.

eulermathematicscompetitive-programming
Project Euler Problem 76

It is possible to write five as a sum in exactly six different ways: How many different ways can one hundred be written

eulermathematicscompetitive-programming
Project Euler Problem 196

Build a triangle from all positive integers in the following way: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

eulermathematicscompetitive-programming
Project Euler Problem 471

The triangle triangle ABC is inscribed in an ellipse with equation frac {x^2} {a^2} + frac {y^2} {b^2} = 1, 0 lt 2b lt a

eulermathematicscompetitive-programming
Project Euler Problem 54

In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way: - Hi

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 768

A certain type of chandelier contains a circular ring of n evenly spaced candleholders.

eulermathematicscompetitive-programming
Project Euler Problem 618

Consider the numbers 15, 16 and 18: 15=3times 5 and 3+5=8.

eulermathematicscompetitive-programming
Project Euler Problem 319

Let x1, x2, dots, xn be a sequence of length n such that: - x1 = 2 - for all 1 lt i le n: x{i - 1} lt xi - for all i and

eulermathematicscompetitive-programming
Project Euler Problem 313

In a sliding game a counter may slide horizontally or vertically into an empty space.

eulermathematicscompetitive-programming
Project Euler Problem 116

A row of five grey square tiles is to have a number of its tiles replaced with coloured oblong tiles chosen from red (le

eulermathematicscompetitive-programming
Project Euler Problem 522

Despite the popularity of Hilbert's infinite hotel, Hilbert decided to try managing extremely large finite hotels, inste

eulermathematicscompetitive-programming
Project Euler Problem 190

Let Sm = (x1, x2, dots , xm) be the m-tuple of positive real numbers with x1 + x2 + cdots + xm = m for which Pm = x1 cdo

eulermathematicscompetitive-programming
Project Euler Problem 441

For an integer M, we define R(M) as the sum of 1/(p cdot q) for all the integer pairs p and q which satisfy all of these

eulermathematicscompetitive-programming
Project Euler Problem 305

Let's call S the (infinite) string that is made by concatenating the consecutive positive integers (starting from 1) wri

eulermathematicscompetitive-programming
Project Euler Problem 69

Euler's totient function, phi(n) [sometimes called the phi function], is defined as the number of positive integers not

eulermathematicscompetitive-programming
Project Euler Problem 203

The binomial coefficients displaystyle binom n k can be arranged in triangular form, Pascal's triangle, like this: | | |

eulermathematicscompetitive-programming
Project Euler Problem 868

There is a method that is used by Bell ringers to generate all variations of the order that bells are rung.

eulermathematicscompetitive-programming
Project Euler Problem 870

Two players play a game with a single pile of stones of initial size n.

eulermathematicscompetitive-programming
Project Euler Problem 757

A positive integer N is stealthy, if there exist positive integers a, b, c, d such that ab = cd = N and a+b = c+d+1.

eulermathematicscompetitive-programming
Project Euler Problem 415

A set of lattice points S is called a titanic set if there exists a line passing through exactly two points in S.

eulermathematicscompetitive-programming
Project Euler Problem 120

Let r be the remainder when (a - 1)^n + (a + 1)^n is divided by a^2.

eulermathematicscompetitive-programming
Project Euler Problem 688

We stack n plates into k non-empty piles where each pile is a different size.

eulermathematicscompetitive-programming
Project Euler Problem 107

The following undirected network consists of seven vertices and twelve edges with a total weight of 243.

eulermathematicscompetitive-programming
Project Euler Problem 413

We say that a d-digit positive number (no leading zeros) is a one-child number if exactly one of its sub-strings is divi

eulermathematicscompetitive-programming
Project Euler Problem 336

A train is used to transport four carriages in the order: ABCD.

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 376

Consider the following set of dice with nonstandard pips: Die A: 1 4 4 4 4 4 Die B: 2 2 2 5 5 5 Die C: 3 3 3 3 3 6 A gam

eulermathematicscompetitive-programming
Project Euler Problem 742

A symmetrical convex grid polygon is a polygon such that: - All its vertices have integer coordinates.

eulermathematicscompetitive-programming
Project Euler Problem 60

The primes 3, 7, 109, and 673, are quite remarkable.

eulermathematicscompetitive-programming
Project Euler Problem 662

Alice walks on a lattice grid.

eulermathematicscompetitive-programming
Project Euler Problem 268

It can be verified that there are 23 positive integers less than 1000 that are divisible by at least four distinct prime

eulermathematicscompetitive-programming
Project Euler Problem 779

For a positive integer n gt 1, let p(n) be the smallest prime dividing n, and let alpha(n) be its p-adic order, i.e.

eulermathematicscompetitive-programming
Project Euler Problem 100

If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were taken

eulermathematicscompetitive-programming
Project Euler Problem 223

Let us call an integer sided triangle with sides a le b le c barely acute if the sides satisfy a^2 + b^2 = c^2 + 1.

eulermathematicscompetitive-programming
Project Euler Problem 255

We define the rounded-square-root of a positive integer n as the square root of n rounded to the nearest integer.

eulermathematicscompetitive-programming
Project Euler Problem 191

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

eulermathematicscompetitive-programming
Project Euler Problem 350

A list of size n is a sequence of n natural numbers.

eulermathematicscompetitive-programming
Project Euler Problem 433

Let E(x0, y0) be the number of steps it takes to determine the greatest common divisor of x0 and y0 with Euclid's algori

eulermathematicscompetitive-programming
Project Euler Problem 320

Let N(i) be the smallest integer n such that n! is divisible by (i!)^{1234567890} Let S(u)=sum N(i) for 10 le i le u.

eulermathematicscompetitive-programming
Project Euler Problem 64

All square roots are periodic when written as continued fractions and can be written in the form: For example, let us co

eulermathematicscompetitive-programming
Project Euler Problem 93

By using each of the digits from the set, 1, 2, 3, 4, exactly once, and making use of the four arithmetic operations (+,

eulermathematicscompetitive-programming
Project Euler Problem 605

Consider an n-player game played in consecutive pairs: Round 1 takes place between players 1 and 2, round 2 takes place

eulermathematicscompetitive-programming
Project Euler Problem 352

Each one of the 25 sheep in a flock must be tested for a rare virus, known to affect 2 of the sheep population.

eulermathematicscompetitive-programming
Project Euler Problem 734

The logical-OR of two bits is 0 if both bits are 0, otherwise it is 1.

eulermathematicscompetitive-programming
Project Euler Problem 237

Let T(n) be the number of tours over a 4 times n playing board such that: - The tour starts in the top left corner.

eulermathematicscompetitive-programming
Project Euler Problem 624

An unbiased coin is tossed repeatedly until two consecutive heads are obtained.

eulermathematicscompetitive-programming
Project Euler Problem 538

Consider a positive integer sequence S = (s1, s2, dots, sn).

eulermathematicscompetitive-programming
Project Euler Problem 772

A k-bounded partition of a positive integer N is a way of writing N as a sum of positive integers not exceeding k.

eulermathematicscompetitive-programming
Project Euler Problem 708

A positive integer, n, is factorised into prime factors.

eulermathematicscompetitive-programming
Project Euler Problem 176

The four right-angled triangles with sides (9,12,15), (12,16,20), (5,12,13) and (12,35,37) all have one of the shorter s

eulermathematicscompetitive-programming
Project Euler Problem 192

Let x be a real number.

eulermathematicscompetitive-programming
Project Euler Problem 597

The Torpids are rowing races held annually in Oxford, following some curious rules: - A division consists of n boats (ty

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 815

A pack of cards contains 4n cards with four identical cards of each value.

eulermathematicscompetitive-programming
Project Euler Problem 97

The first known prime found to exceed one million digits was discovered in 1999, and is a Mersenne prime of the form 2^{

eulermathematicscompetitive-programming
Project Euler Problem 500

The number of divisors of 120 is 16.

eulermathematicscompetitive-programming
Project Euler Problem 523

Consider the following algorithm for sorting a list: - 1.

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 806

This problem combines the game of Nim with the Towers of Hanoi.

eulermathematicscompetitive-programming
Project Euler Problem 553

Let P(n) be the set of the first n positive integers 1, 2, dots, n.

eulermathematicscompetitive-programming
Project Euler Problem 52

It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different orde

eulermathematicscompetitive-programming
Project Euler Problem 496

Given an integer sided triangle ABC: Let I be the incenter of ABC.

eulermathematicscompetitive-programming
Project Euler Problem 91

The points P(x1, y1) and Q(x2, y2) are plotted at integer co-ordinates and are joined to the origin, O(0,0), to form tri

eulermathematicscompetitive-programming
Project Euler Problem 685

Writing down the numbers which have a digit sum of 10 in ascending order, we get: 19, 28, 37, 46,55,64,73,82,91,109, 118

eulermathematicscompetitive-programming
Project Euler Problem 89

For a number written in Roman numerals to be considered valid there are basic rules which must be followed.

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

A secret integer t is selected at random within the range 1 le t le n.

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 238

Create a sequence of numbers using the "Blum Blum Shub" pseudo-random number generator: Concatenate these numbers s0s1s2

eulermathematicscompetitive-programming
Project Euler Problem 234

For an integer n ge 4, we define the lower prime square root of n, denoted by operatorname{lps}(n), as the largest prime

eulermathematicscompetitive-programming
Project Euler Problem 503

Alice is playing a game with n cards numbered 1 to n.

eulermathematicscompetitive-programming
Project Euler Problem 649

Alice and Bob are taking turns playing a game consisting of c different coins on a chessboard of size n by n.

eulermathematicscompetitive-programming
Project Euler Problem 520

We define a simber to be a positive integer in which any odd digit, if present, occurs an odd number of times, and any e

eulermathematicscompetitive-programming
Project Euler Problem 173

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 860

Gary and Sally play a game using gold and silver coins arranged into a number of vertical stacks, alternating turns.

eulermathematicscompetitive-programming
Project Euler Problem 646

Let n be a natural number and p1^{alpha1}cdot p2^{alpha2}cdots pk^{alphak} its prime factorisation.

eulermathematicscompetitive-programming
Project Euler Problem 117

Using a combination of grey square tiles and oblong tiles chosen from: red tiles (measuring two units), green tiles (mea

eulermathematicscompetitive-programming
Project Euler Problem 453

A simple quadrilateral is a polygon that has four distinct vertices, has no straight angles and does not self-intersect.

eulermathematicscompetitive-programming
Project Euler Problem 848

Two players play a game.

eulermathematicscompetitive-programming
Project Euler Problem 430

N disks are placed in a row, indexed 1 to N from left to right.

eulermathematicscompetitive-programming
Project Euler Problem 271

For a positive number n, define S(n) as the sum of the integers x, for which 1 lt x lt n and x^3 equiv 1 bmod n.

eulermathematicscompetitive-programming
Project Euler Problem 233

Let f(N) be the number of points with integer coordinates that are on a circle passing through (0,0), (N,0),(0,N), and (

eulermathematicscompetitive-programming
Project Euler Problem 697

Given a fixed real number c, define a random sequence (Xn){nge 0} by the following random process: - X0 = c (with probab

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 108

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

eulermathematicscompetitive-programming