brain

tamnd's digital brain — notes, problems, research

42723 notes

Project Euler Problem 189

Consider the following configuration of 64 triangles: We wish to colour the interior of each triangle with one of three

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

k defects are randomly distributed amongst n integrated-circuit chips produced by a factory (any number of defects may b

eulermathematicscompetitive-programming
Project Euler Problem 720

Consider all permutations of 1, 2, ldots N, listed in lexicographic order.

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 279

How many triangles are there with integral sides, at least one integral angle (measured in degrees), and a perimeter tha

eulermathematicscompetitive-programming
Project Euler Problem 162

In the hexadecimal number system numbers are represented using 16 different digits: The hexadecimal number mathrm{AF} wh

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 448

The function operatorname{mathbf{lcm}}(a,b) denotes the least common multiple of a and b.

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

How many integers 0 le n lt 10^{18} have the property that the sum of the digits of n equals the sum of digits of 137n?

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 191

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

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

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

eulermathematicscompetitive-programming
Project Euler Problem 402

It can be shown that the polynomial n^4 + 4n^3 + 2n^2 + 5n is a multiple of 6 for every integer n.

eulermathematicscompetitive-programming
Project Euler Problem 155

An electric circuit uses exclusively identical capacitors of the same value C.

eulermathematicscompetitive-programming
Project Euler Problem 595

A deck of cards numbered from 1 to n is shuffled randomly such that each permutation is equally likely.

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

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

eulermathematicscompetitive-programming
Project Euler Problem 73

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

eulermathematicscompetitive-programming
Project Euler Problem 74

The number 145 is well known for the property that the sum of the factorial of its digits is equal to 145: Perhaps less

eulermathematicscompetitive-programming
Project Euler Problem 496

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

eulermathematicscompetitive-programming
Project Euler Problem 409

Let n be a positive integer.

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 665

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

eulermathematicscompetitive-programming
Project Euler Problem 523

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

eulermathematicscompetitive-programming
Project Euler Problem 252

Given a set of points on a plane, we define a convex hole to be a convex polygon having as vertices any of the given poi

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 588

The coefficients in the expansion of (x+1)^k are called binomial coefficients.

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 551

Let a0, a1, dots be an integer sequence defined by: - a0 = 1; - for n ge 1, an is the sum of the digits of all preceding

eulermathematicscompetitive-programming
Project Euler Problem 478

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

eulermathematicscompetitive-programming
Project Euler Problem 115

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

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 666

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

eulermathematicscompetitive-programming
Project Euler Problem 509

Anton and Bertrand love to play three pile Nim.

eulermathematicscompetitive-programming
Project Euler Problem 826

Consider a wire of length 1 unit between two posts.

eulermathematicscompetitive-programming
Project Euler Problem 640

Bob plays a single-player game of chance using two standard 6-sided dice and twelve cards numbered 1 to 12.

eulermathematicscompetitive-programming
Project Euler Problem 266

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

eulermathematicscompetitive-programming
Project Euler Problem 752

When (1+sqrt 7) is raised to an integral power, n, we always get a number of the form (a+bsqrt 7).

eulermathematicscompetitive-programming
Project Euler Problem 149

Looking at the table below, it is easy to verify that the maximum possible sum of adjacent numbers in any direction (hor

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

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

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 160

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

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

The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28.

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 718

Consider the equation 17^pa+19^pb+23^pc = n where a, b, c and p are positive integers, i.e.

eulermathematicscompetitive-programming
Project Euler Problem 662

Alice walks on a lattice grid.

eulermathematicscompetitive-programming
Project Euler Problem 613

Dave is doing his homework on the balcony and, preparing a presentation about Pythagorean triangles, has just cut out a

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 394

Jeff eats a pie in an unusual way.

eulermathematicscompetitive-programming
Project Euler Problem 831

Let g(m) be the integer defined by the following double sum of products of binomial coefficients: You are given that g(1

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 106

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

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

For a positive integer n, let f(n) be the sum of the squares of the digits (in base 10) of n, e.g.

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 556

A Gaussian integer is a number z = a + bi where a, b are integers and i^2 = -1.

eulermathematicscompetitive-programming
Project Euler Problem 346

The number 7 is special, because 7 is 111 written in base 2, and 11 written in base 6 (i.e.

eulermathematicscompetitive-programming
Project Euler Problem 363

A cubic Bézier curve is defined by four points: P0, P1, P2, and P3.

eulermathematicscompetitive-programming
Project Euler Problem 232

Two players share an unbiased coin and take it in turns to play The Race.

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

Considering 4-digit primes containing repeated digits it is clear that they cannot all be the same: 1111 is divisible by

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 846

A bracelet is made by connecting at least three numbered beads in a circle.

eulermathematicscompetitive-programming
Project Euler Problem 638

Let P{a,b} denote a path in a atimes b lattice grid with following properties: - The path begins at (0,0) and ends at (a

eulermathematicscompetitive-programming
Project Euler Problem 225

The sequence 1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193, 355, 653, 1201, dots is defined by T1 = T2 = T3 = 1 and Tn = T{n -

eulermathematicscompetitive-programming
Project Euler Problem 661

Two friends A and B are great fans of Chess.

eulermathematicscompetitive-programming
Project Euler Problem 481

A group of chefs (numbered 1, 2, etc) participate in a turn-based strategic cooking competition.

eulermathematicscompetitive-programming
Project Euler Problem 212

An axis-aligned cuboid, specified by parameters (x0, y0, z0), (dx, dy, dz), consists of all points (X,Y,Z) such that x0

eulermathematicscompetitive-programming
Project Euler Problem 479

Let ak, bk, and ck represent the three solutions (real or complex numbers) to the equation frac 1 x = (frac k x)^2(k+x^2

eulermathematicscompetitive-programming
Project Euler Problem 358

A cyclic number with n digits has a very interesting property: When it is multiplied by 1, 2, 3, 4, dots, n, all the pro

eulermathematicscompetitive-programming
Project Euler Problem 821

A set, S, of integers is called 123-separable if S, 2S and 3S are disjoint.

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

The function f is defined for all positive integers as follows: It can be proven that f(n) is integer for all values of

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 878

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

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 796

A standard 52 card deck comprises thirteen ranks in four suits.

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 184

Consider the set Ir of points (x,y) with integer co-ordinates in the interior of the circle with radius r, centered at t

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 443

Let g(n) be a sequence defined as follows: g(4) = 13, g(n) = g(n-1) + gcd(n, g(n-1)) for n gt 4.

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