brain

tamnd's digital brain — notes, problems, research

42721 notes

Project Euler Problem 666

Members of a species of bacteria occur in two different types: alpha and beta.

eulermathematicscompetitive-programming
Project Euler Problem 446

For every integer n1, the family of functions f{n,a,b} is defined by f{n,a,b}(x)equiv a x + b mod n for a,b,x integer an

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 68

Consider the following "magic" 3-gon ring, filled with the numbers 1 to 6, and each line adding to nine.

eulermathematicscompetitive-programming
Project Euler Problem 549

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

eulermathematicscompetitive-programming
Project Euler Problem 701

Consider a rectangle made up of W times H square cells each with area 1.

eulermathematicscompetitive-programming
Project Euler Problem 287

The quadtree encoding allows us to describe a 2^N times 2^N black and white image as a sequence of bits (0 and 1).

eulermathematicscompetitive-programming
Project Euler Problem 387

A Harshad or Niven number is a number that is divisible by the sum of its digits.

eulermathematicscompetitive-programming
Project Euler Problem 159

A composite number can be factored many different ways.

eulermathematicscompetitive-programming
Project Euler Problem 132

A number consisting entirely of ones is called a repunit.

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 430

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

eulermathematicscompetitive-programming
Project Euler Problem 357

Consider the divisors of 30: 1,2,3,5,6,10,15,30.

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

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

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 800

An integer of the form p^q q^p with prime numbers p neq q is called a hybrid-integer.

eulermathematicscompetitive-programming
Project Euler Problem 96

Su Doku (Japanese meaning number place) is the name given to a popular puzzle concept.

eulermathematicscompetitive-programming
Project Euler Problem 621

Gauss famously proved that every positive integer can be expressed as the sum of three triangular numbers (including 0 a

eulermathematicscompetitive-programming
Project Euler Problem 732

N trolls are in a hole that is DN cm deep.

eulermathematicscompetitive-programming
Project Euler Problem 880

(x,y) is called a nested radical pair if x and y are non-zero integers such that dfrac{x}{y} is not a cube of a rational

eulermathematicscompetitive-programming
Project Euler Problem 693

Two positive integers x and y (x y) can generate a sequence in the following manner: - ax = y is the first term, - a{z+1

eulermathematicscompetitive-programming
Project Euler Problem 330

An infinite sequence of real numbers a(n) is defined for all integers n as follows: For example, a(0) = dfrac{1}{1!} + d

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 469

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

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 302

A positive integer n is powerful if p^2 is a divisor of n for every prime factor p in n.

eulermathematicscompetitive-programming
Project Euler Problem 418

Let n be a positive integer.

eulermathematicscompetitive-programming
Project Euler Problem 856

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

eulermathematicscompetitive-programming
Project Euler Problem 101

If we are presented with the first k terms of a sequence it is impossible to say with certainty the value of the next te

eulermathematicscompetitive-programming
Project Euler Problem 661

Two friends A and B are great fans of Chess.

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 801

The positive integral solutions of the equation x^y=y^x are (2,4), (4,2) and (k,k) for all k 0.

eulermathematicscompetitive-programming
Project Euler Problem 109

In the game of darts a player throws three darts at a target board which is split into twenty equal sized sections numbe

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

For a positive integer n, d(n) is defined to be the sum of the digits of n.

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 612

Let's call two numbers friend numbers if their representation in base 10 has at least one common digit.

eulermathematicscompetitive-programming
Project Euler Problem 105

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

eulermathematicscompetitive-programming
Project Euler Problem 704

Define g(n, m) to be the largest integer k such that 2^k divides binom{n}m.

eulermathematicscompetitive-programming
Project Euler Problem 142

Find the smallest x + y + z with integers x gt y gt z gt 0 such that x + y, x - y, x + z, x - z, y + z, y - z are all pe

eulermathematicscompetitive-programming
Project Euler Problem 672

Consider the following process that can be applied recursively to any positive integer n: - if n = 1 do nothing and the

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 644

Sam and Tom are trying a game of (partially) covering a given line segment of length L by taking turns in placing unit s

eulermathematicscompetitive-programming
Project Euler Problem 575

It was quite an ordinary day when a mysterious alien vessel appeared as if from nowhere.

eulermathematicscompetitive-programming
Project Euler Problem 802

Let Bbb R^2 be the set of pairs of real numbers (x, y).

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 412

For integers m, n (0 leq n lt m), let L(m, n) be an m times m grid with the top-right n times n grid removed.

eulermathematicscompetitive-programming
Project Euler Problem 250

Find the number of non-empty subsets of 1^1, 2^2, 3^3,dots, 250250^{250250}, the sum of whose elements is divisible by 2

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 628

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

eulermathematicscompetitive-programming
Project Euler Problem 122

The most naive way of computing n^{15} requires fourteen multiplications: But using a "binary" method you can compute it

eulermathematicscompetitive-programming
Project Euler Problem 62

The cube, 41063625 (345^3), can be permuted to produce two other cubes: 56623104 (384^3) and 66430125 (405^3).

eulermathematicscompetitive-programming
Project Euler Problem 596

Let T(r) be the number of integer quadruplets x, y, z, t such that x^2 + y^2 + z^2 + t^2 le r^2.

eulermathematicscompetitive-programming
Project Euler Problem 810

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

eulermathematicscompetitive-programming
Project Euler Problem 497

Bob is very familiar with the famous mathematical puzzle/game, "Tower of Hanoi," which consists of three upright rods an

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 791

Denote the average of k numbers x1, ..., xk by bar{x} = frac{1}{k} sumi xi.

eulermathematicscompetitive-programming
Project Euler Problem 457

Let f(n) = n^2 - 3n - 1.

eulermathematicscompetitive-programming
Project Euler Problem 399

The first 15 Fibonacci numbers are: 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610.

eulermathematicscompetitive-programming
Project Euler Problem 141

A positive integer, n, is divided by d and the quotient and remainder are q and r respectively.

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

A number consisting entirely of ones is called a repunit.

eulermathematicscompetitive-programming
Project Euler Problem 121

A bag contains one red disc and one blue disc.

eulermathematicscompetitive-programming
Project Euler Problem 331

N times N disks are placed on a square game board.

eulermathematicscompetitive-programming
Project Euler Problem 599

The well-known Rubik's Cube puzzle has many fascinating mathematical properties.

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 182

The RSA encryption is based on the following procedure: Generate two distinct primes p and q.

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 811

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

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 624

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

eulermathematicscompetitive-programming
Project Euler Problem 285

Albert chooses a positive integer k, then two real numbers a, b are randomly chosen in the interval [0,1] with uniform d

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 166

A 4 times 4 grid is filled with digits d, 0 le d le 9.

eulermathematicscompetitive-programming
Project Euler Problem 270

A square piece of paper with integer dimensions N times N is placed with a corner at the origin and two of its sides alo

eulermathematicscompetitive-programming
Project Euler Problem 537

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

eulermathematicscompetitive-programming
Project Euler Problem 710

Solution to Project Euler Problem 710.

eulermathematicscompetitive-programming
Project Euler Problem 226

The blancmange curve is the set of points (x, y) such that 0 le x le 1 and y = sum limits{n = 0}^{infty} {dfrac{s(2^n x)

eulermathematicscompetitive-programming
Project Euler Problem 280

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

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 165

A segment is uniquely defined by its two endpoints.

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 343

For any positive integer k, a finite sequence ai of fractions xi/yi is defined by: a1 = 1/k and ai = (x{i - 1} + 1) / (y

eulermathematicscompetitive-programming
Project Euler Problem 895

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

Consider a wire of length 1 unit between two posts.

eulermathematicscompetitive-programming
Project Euler Problem 67

By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top

eulermathematicscompetitive-programming
Project Euler Problem 336

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

eulermathematicscompetitive-programming
Project Euler Problem 464

The Möbius function, denoted mu(n), is defined as: - mu(n) = (-1)^{omega(n)} if n is squarefree (where omega(n) is the n

eulermathematicscompetitive-programming
Project Euler Problem 259

A positive integer will be called reachable if it can result from an arithmetic expression obeying the following rules:

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

It is easily proved that no equilateral triangle exists with integral length sides and integral area.

eulermathematicscompetitive-programming
Project Euler Problem 538

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

eulermathematicscompetitive-programming
Project Euler Problem 764

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

eulermathematicscompetitive-programming
Project Euler Problem 273

Consider equations of the form: a^2 + b^2 = N, 0 le a le b, a, b and N integer.

eulermathematicscompetitive-programming