brain

tamnd's digital brain — notes, problems, research

43815 notes

Project Euler Problem 888

Two players play a game with a number of piles of stones, alternating turns.

eulermathematicscompetitive-programming
Project Euler Problem 198

A best approximation to a real number x for the denominator bound d is a rational number frac r s (in reduced form) with

eulermathematicscompetitive-programming
Project Euler Problem 635

Let Aq(n) be the number of subsets, B, of the set 1, 2, ..., q cdot n that satisfy two conditions: 1) B has exactly n el

eulermathematicscompetitive-programming
Project Euler Problem 750

Card Stacking is a game on a computer starting with an array of N cards labelled 1,2,ldots,N.

eulermathematicscompetitive-programming
Project Euler Problem 59

Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for I

eulermathematicscompetitive-programming
Project Euler Problem 294

For a positive integer k, define d(k) as the sum of the digits of k in its usual decimal representation.

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 883

In this problem we consider triangles drawn on a hexagonal lattice, where each lattice point in the plane has six neighb

eulermathematicscompetitive-programming
Project Euler Problem 747

Mamma Triangolo baked a triangular pizza.

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 263

Consider the number 6.

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 542

Let S(k) be the sum of three or more distinct positive integers having the following properties: - No value exceeds k.

eulermathematicscompetitive-programming
Project Euler Problem 799

Pentagonal numbers are generated by the formula: Pn = tfrac 12n(3n-1) giving the sequence: Some pentagonal numbers can b

eulermathematicscompetitive-programming
Project Euler Problem 513

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

eulermathematicscompetitive-programming
Project Euler Problem 524

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

eulermathematicscompetitive-programming
Project Euler Problem 739

Take a sequence of length n.

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 86

A spider, S, sits in one corner of a cuboid room, measuring 6 by 5 by 3, and a fly, F, sits in the opposite corner.

eulermathematicscompetitive-programming
Project Euler Problem 842

Given n equally spaced points on a circle, we define an n-star polygon as an n-gon having those n points as vertices.

eulermathematicscompetitive-programming
Project Euler Problem 676

Let d(i,b) be the digit sum of the number i in base b.

eulermathematicscompetitive-programming
Project Euler Problem 420

A positive integer matrix is a matrix whose elements are all positive integers.

eulermathematicscompetitive-programming
Project Euler Problem 579

A lattice cube is a cube in which all vertices have integer coordinates.

eulermathematicscompetitive-programming
Project Euler Problem 468

An integer is called B-smooth if none of its prime factors is greater than B.

eulermathematicscompetitive-programming
Project Euler Problem 852

This game has a box of N unfair coins and N fair coins.

eulermathematicscompetitive-programming
Project Euler Problem 106

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

eulermathematicscompetitive-programming
Project Euler Problem 862

For a positive integer n define T(n) to be the number of strictly larger integers which can be formed by permuting the d

eulermathematicscompetitive-programming
Project Euler Problem 567

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

eulermathematicscompetitive-programming
Project Euler Problem 478

Let us consider mixtures of three substances: A, B and C.

eulermathematicscompetitive-programming
Project Euler Problem 400

A Fibonacci tree is a binary tree recursively defined as: - T(0) is the empty tree.

eulermathematicscompetitive-programming
Project Euler Problem 753

Fermat's Last Theorem states that no three positive integers a, b, c satisfy the equation for any integer value of n gre

eulermathematicscompetitive-programming
Project Euler Problem 721

Given is the function f(a,n)=lfloor (lceil sqrt a rceil + sqrt a)^n rfloor.

eulermathematicscompetitive-programming
Project Euler Problem 599

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

eulermathematicscompetitive-programming
Project Euler Problem 175

Define f(0)=1 and f(n) to be the number of ways to write n as a sum of powers of 2 where no power occurs more than twice

eulermathematicscompetitive-programming
Project Euler Problem 144

In laser physics, a "white cell" is a mirror system that acts as a delay line for the laser beam.

eulermathematicscompetitive-programming
Project Euler Problem 299

Four points with integer coordinates are selected: A(a, 0), B(b, 0), C(0, c) and D(0, d), with 0 lt a lt b and 0 lt c lt

eulermathematicscompetitive-programming
Project Euler Problem 793

Let Si be an integer sequence produced with the following pseudo-random number generator: - S0 = 290797 - S{i+1} = Si ^2

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 722

For a non-negative integer k, define where sigmak(n) = sum{d mid n} d^k is the sum of the k-th powers of the positive di

eulermathematicscompetitive-programming
Project Euler Problem 452

Define F(m,n) as the number of n-tuples of positive integers for which the product of the elements doesn't exceed m.

eulermathematicscompetitive-programming
Project Euler Problem 288

For any prime p the number N(p, q) is defined by N(p, q) = sum{n = 0}^q Tn cdot p^n with Tn generated by the following r

eulermathematicscompetitive-programming
Project Euler Problem 160

For any N, let f(N) be the last five digits before the trailing zeroes in N!.

eulermathematicscompetitive-programming
Project Euler Problem 858

Define G(N) = sumS operatorname{lcm}(S) where S ranges through all subsets of 1, dots, N and operatorname{lcm} denotes t

eulermathematicscompetitive-programming
Project Euler Problem 483

We define a permutation as an operation that rearranges the order of the elements 1, 2, 3, ..., n.

eulermathematicscompetitive-programming
Project Euler Problem 73

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

eulermathematicscompetitive-programming
Project Euler Problem 609

For every n ge 1 the prime-counting function pi(n) is equal to the number of primes not exceeding n.

eulermathematicscompetitive-programming
Project Euler Problem 227

The Chase is a game played with two dice and an even number of players.

eulermathematicscompetitive-programming
Project Euler Problem 418

Let n be a positive integer.

eulermathematicscompetitive-programming
Project Euler Problem 335

Whenever Peter feels bored, he places some bowls, containing one bean each, in a circle.

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 505

Let: begin{array}{ll} x(0)&=0 x(1)&=1 x(2k)&=(3x(k)+2x(lfloor frac k 2 rfloor)) text{ mod } 2^{60} text{ for } k ge 1 te

eulermathematicscompetitive-programming
Project Euler Problem 156

Starting from zero the natural numbers are written down in base 10 like this: Consider the digit d=1.

eulermathematicscompetitive-programming
Project Euler Problem 832

In this problem oplus is used to represent the bitwise exclusive or of two numbers.

eulermathematicscompetitive-programming
Project Euler Problem 557

A triangle is cut into four pieces by two straight lines, each starting at one vertex and ending on the opposite edge.

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 731

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

eulermathematicscompetitive-programming
Project Euler Problem 669

The Knights of the Order of Fibonacci are preparing a grand feast for their king.

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 758

There are 3 buckets labelled S (small) of 3 litres, M (medium) of 5 litres and L (large) of 8 litres.

eulermathematicscompetitive-programming
Project Euler Problem 410

Let C be the circle with radius r, x^2 + y^2 = r^2.

eulermathematicscompetitive-programming
Project Euler Problem 445

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 824

A Slider is a chess piece that can move one square left or right.

eulermathematicscompetitive-programming
Project Euler Problem 851

Let n be a positive integer and let En be the set of n-tuples of strictly positive integers.

eulermathematicscompetitive-programming
Project Euler Problem 491

We call a positive integer double pandigital if it uses all the digits 0 to 9 exactly twice (with no leading zero).

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 674

We define the mathcal{I} operator as the function and mathcal{I}-expressions as arithmetic expressions built only from v

eulermathematicscompetitive-programming
Project Euler Problem 724

A depot uses n drones to disperse packages containing essential supplies along a long straight road.

eulermathematicscompetitive-programming
Project Euler Problem 845

Let D(n) be the n-th positive integer that has the sum of its digits a prime.

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 272

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

eulermathematicscompetitive-programming
Project Euler Problem 104

The Fibonacci sequence is defined by the recurrence relation: Fn = F{n - 1} + F{n - 2}, where F1 = 1 and F2 = 1.

eulermathematicscompetitive-programming
Project Euler Problem 675

Let omega(n) denote the number of distinct prime divisors of a positive integer n.

eulermathematicscompetitive-programming
Project Euler Problem 180

For any integer n, consider the three functions and their combination We call (x, y, z) a golden triple of order k if x,

eulermathematicscompetitive-programming
Project Euler Problem 650

Let B(n) = displaystyle prod{k=0}^n {n choose k}, a product of binomial coefficients.

eulermathematicscompetitive-programming
Project Euler Problem 764

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

eulermathematicscompetitive-programming
Project Euler Problem 455

Let f(n) be the largest positive integer x less than 10^9 such that the last 9 digits of n^x form the number x (includin

eulermathematicscompetitive-programming
Project Euler Problem 466

Let P(m,n) be the number of distinct terms in an mtimes n multiplication table.

eulermathematicscompetitive-programming
Project Euler Problem 72

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

eulermathematicscompetitive-programming
Project Euler Problem 405

We wish to tile a rectangle whose length is twice its width.

eulermathematicscompetitive-programming
Project Euler Problem 236

Suppliers 'A' and 'B' provided the following numbers of products for the luxury hamper market: | Product | 'A' | 'B' | |

eulermathematicscompetitive-programming
Project Euler Problem 137

Consider the infinite polynomial series AF(x) = x F1 + x^2 F2 + x^3 F3 + dots, where Fk is the kth term in the Fibonacci

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 583

A standard envelope shape is a convex figure consisting of an isosceles triangle (the flap) placed on top of a rectangle

eulermathematicscompetitive-programming
Project Euler Problem 490

There are n stones in a pond, numbered 1 to n.

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 711

Oscar and Eric play the following game.

eulermathematicscompetitive-programming
Project Euler Problem 658

In the context of formal languages, any finite sequence of letters of a given alphabet Sigma is called a word over Sigma

eulermathematicscompetitive-programming
Project Euler Problem 300

In a very simplified form, we can consider proteins as strings consisting of hydrophobic (H) and polar (P) elements, e.g

eulermathematicscompetitive-programming
Project Euler Problem 881

For a positive integer n create a graph using its divisors as vertices.

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 512

Let varphi(n) be Euler's totient function.

eulermathematicscompetitive-programming
Project Euler Problem 694

A positive integer n is considered cube-full, if for every prime p that divides n, so does p^3.

eulermathematicscompetitive-programming
Project Euler Problem 394

Jeff eats a pie in an unusual way.

eulermathematicscompetitive-programming
Project Euler Problem 428

Let a, b and c be positive numbers.

eulermathematicscompetitive-programming
Project Euler Problem 653

Consider a horizontal frictionless tube with length L millimetres, and a diameter of 20 millimetres.

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 199

Three circles of equal radius are placed inside a larger circle such that each pair of circles is tangent to one another

eulermathematicscompetitive-programming
Project Euler Problem 322

Let T(m, n) be the number of the binomial coefficients ^iCn that are divisible by 10 for n le i lt m (i, m and n are pos

eulermathematicscompetitive-programming
Project Euler Problem 484

The arithmetic derivative is defined by - p^prime = 1 for any prime p - (ab)^prime = a^prime b + ab^prime for all intege

eulermathematicscompetitive-programming
Project Euler Problem 663

Let tk be the tribonacci numbers defined as: quad t0 = t1 = 0; quad t2 = 1; quad tk = t{k-1} + t{k-2} + t{k-3} quad text

eulermathematicscompetitive-programming