brain

tamnd's digital brain — notes, problems, research

42724 notes

Project Euler Problem 99

Comparing two numbers written in index form like 2^{11} and 3^7 is not difficult, as any calculator would confirm that 2

eulermathematicscompetitive-programming
Project Euler Problem 308

A program written in the programming language Fractran consists of a list of fractions.

eulermathematicscompetitive-programming
Project Euler Problem 66

Consider quadratic Diophantine equations of the form: For example, when D=13, the minimal solution in x is 649^2 - 13 ti

eulermathematicscompetitive-programming
Project Euler Problem 749

A positive integer, n, is a near power sum if there exists a positive integer, k, such that the sum of the kth powers of

eulermathematicscompetitive-programming
Project Euler Problem 488

Alice and Bob have enjoyed playing Nim every day.

eulermathematicscompetitive-programming
Project Euler Problem 477

The number sequence game starts with a sequence S of N numbers written on a line.

eulermathematicscompetitive-programming
Project Euler Problem 515

Let d(p, n, 0) be the multiplicative inverse of n modulo prime p, defined as n times d(p, n, 0) = 1 bmod p.

eulermathematicscompetitive-programming
Project Euler Problem 564

A line segment of length 2n-3 is randomly split into n segments of integer length (n ge 3).

eulermathematicscompetitive-programming
Project Euler Problem 110

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

eulermathematicscompetitive-programming
Project Euler Problem 113

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 713

Turan has the electrical water heating system outside his house in a shed.

eulermathematicscompetitive-programming
Project Euler Problem 390

Consider the triangle with sides sqrt 5, sqrt {65} and sqrt {68}.

eulermathematicscompetitive-programming
Project Euler Problem 357

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

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 432

Let S(n,m) = sumphi(n times i) for 1 leq i leq m.

eulermathematicscompetitive-programming
Project Euler Problem 874

Let p(t) denote the (t+1)th prime number.

eulermathematicscompetitive-programming
Project Euler Problem 617

For two integers n,e gt 1, we define an (n,e)-MPS (Mirror Power Sequence) to be an infinite sequence of integers (ai){ig

eulermathematicscompetitive-programming
Project Euler Problem 235

Given is the arithmetic-geometric sequence u(k) = (900-3k)r^{k - 1}.

eulermathematicscompetitive-programming
Project Euler Problem 871

Let f be a function from a finite set S to itself.

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 508

Consider the Gaussian integer i-1.

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

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

eulermathematicscompetitive-programming
Project Euler Problem 439

Let d(k) be the sum of all divisors of k.

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

You probably know the game Fifteen Puzzle.

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

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

eulermathematicscompetitive-programming
Project Euler Problem 215

Consider the problem of building a wall out of 2 times 1 and 3 times 1 bricks (text{horizontal} times text{vertical} dim

eulermathematicscompetitive-programming
Project Euler Problem 510

Circles A and B are tangent to each other and to line L at three distinct points.

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 630

Given a set, L, of unique lines, let M(L) be the number of lines in the set and let S(L) be the sum over every line of t

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 440

We want to tile a board of length n and height 1 completely, with either 1 times 2 blocks or 1 times 1 blocks with a sin

eulermathematicscompetitive-programming
Project Euler Problem 60

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

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 325

A game is played with two piles of stones and two players.

eulermathematicscompetitive-programming
Project Euler Problem 528

Let S(n, k, b) represent the number of valid solutions to x1 + x2 + cdots + xk le n, where 0 le xm le b^m for all 1 le m

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

Let a1, a2, dots, an be an integer sequence of length n such that: - a1 = 6 - for all 1 le i lt n: phi(ai) lt phi(a{i +

eulermathematicscompetitive-programming
Project Euler Problem 513

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

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 721

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

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 108

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

eulermathematicscompetitive-programming
Project Euler Problem 217

A positive integer with k (decimal) digits is called balanced if its first lceil k/2 rceil digits sum to the same value

eulermathematicscompetitive-programming
Project Euler Problem 467

An integer s is called a superinteger of another integer n if the digits of n form a subsequenceA subsequence is a seque

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 771

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

eulermathematicscompetitive-programming
Project Euler Problem 745

For a positive integer, n, define g(n) to be the maximum perfect square that divides n.

eulermathematicscompetitive-programming
Project Euler Problem 656

Given an irrational number alpha, let Salpha(n) be the sequence Salpha(n)=lfloor {alpha cdot n} rfloor - lfloor {alpha c

eulermathematicscompetitive-programming
Project Euler Problem 719

We define an S-number to be a natural number, n, that is a perfect square and its square root can be obtained by splitti

eulermathematicscompetitive-programming
Project Euler Problem 619

For a set of positive integers a, a+1, a+2, dots , b, let C(a,b) be the number of non-empty subsets in which the product

eulermathematicscompetitive-programming
Project Euler Problem 159

A composite number can be factored many different ways.

eulermathematicscompetitive-programming
Project Euler Problem 730

For a non-negative integer k, the triple (p,q,r) of positive integers is called a k-shifted Pythagorean triple if (p, q,

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 133

A number consisting entirely of ones is called a repunit.

eulermathematicscompetitive-programming
Project Euler Problem 647

It is possible to find positive integers A and B such that given any triangular number, Tn, then ATn +B is always a tria

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

For a positive integer n, the function g(n) is defined as For example, g(4) = -gcd left(4,1^2right) + gcd left(4,2^2righ

eulermathematicscompetitive-programming
Project Euler Problem 406

We are trying to find a hidden number selected from the set of integers 1, 2, dots, n by asking questions.

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 877

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

eulermathematicscompetitive-programming
Project Euler Problem 368

The harmonic series 1 + frac 1 2 + frac 1 3 + frac 1 4 + cdots is well known to be divergent.

eulermathematicscompetitive-programming
Project Euler Problem 598

Consider the number 48.

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

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

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 350

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

eulermathematicscompetitive-programming
Project Euler Problem 879

A touch-screen device can be unlocked with a "password" consisting of a sequence of two or more distinct spots that the

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 623

The lambda-calculus is a universal model of computation at the core of functional programming languages.

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 373

Every triangle has a circumscribed circle that goes through the three vertices.

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 295

We call the convex area enclosed by two circles a lenticular hole if: - The centres of both circles are on lattice point

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 599

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

eulermathematicscompetitive-programming
Project Euler Problem 179

Find the number of integers 1 lt n lt 10^7, for which n and n + 1 have the same number of positive divisors.

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 769

Consider the following binary quadratic form: A positive integer q has a primitive representation if there exist positiv

eulermathematicscompetitive-programming
Project Euler Problem 493

70 coloured balls are placed in an urn, 10 for each of the seven rainbow colours.

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 886

A permutation of 2,3,ldots,n is a rearrangement of these numbers.

eulermathematicscompetitive-programming
Project Euler Problem 642

Let f(n) be the largest prime factor of n and displaystyle F(n) = sum{i=2}^n f(i).

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 863

Using only a six-sided fair dice and a five-sided fair dice, we would like to emulate an n-sided fair dice.

eulermathematicscompetitive-programming
Project Euler Problem 280

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

eulermathematicscompetitive-programming