brain

tamnd's digital brain — notes, problems, research

42734 notes

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 764

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

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 760

Define where oplus, vee, wedge are the bitwise XOR, OR and AND operator respectively.

eulermathematicscompetitive-programming
Project Euler Problem 735

Let f(n) be the number of divisors of 2n^2 that are no greater than n.

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 618

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

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 802

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

eulermathematicscompetitive-programming
Project Euler Problem 620

A circle C of circumference c centimetres has a smaller circle S of circumference s centimetres lying off-centre within

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 820

Let dn(x) be the nth decimal digit of the fractional part of x, or 0 if the fractional part has fewer than n digits.

eulermathematicscompetitive-programming
Project Euler Problem 191

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

eulermathematicscompetitive-programming
Project Euler Problem 889

Recall the blancmange function from Problem 226: T(x) = sumlimits{n = 0}^inftydfrac{s(2^nx)}{2^n}, where s(x) is the dis

eulermathematicscompetitive-programming
Project Euler Problem 224

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

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 174

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 494

The Collatz sequence is defined as: a{i+1} = left large{frac {ai} 2 atop 3 ai+1} {text{if }aitext{ is even} atop text{if

eulermathematicscompetitive-programming
Project Euler Problem 581

A number is p-smooth if it has no prime factors larger than p.

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 857

A graph is made up of vertices and coloured edges.

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 882

Dr. One and Dr. Zero are playing the following partisan game. The game begins with one 1, two 2's, three 3's, ..., n n's

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

A square is drawn around a circle as shown in the diagram below on the left.

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

An m times n maze is an m times n rectangular grid with walls placed between grid cells such that there is exactly one p

eulermathematicscompetitive-programming
Project Euler Problem 132

A number consisting entirely of ones is called a repunit.

eulermathematicscompetitive-programming
Project Euler Problem 655

The numbers 545, 5995 and 15151 are the three smallest palindromes divisible by 109.

eulermathematicscompetitive-programming
Project Euler Problem 664

Peter is playing a solitaire game on an infinite checkerboard, each square of which can hold an unlimited number of toke

eulermathematicscompetitive-programming
Project Euler Problem 164

How many 20 digit numbers n (without any leading zero) exist such that no three consecutive digits of n have a sum great

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

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

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 550

Two players are playing a game, alternating turns.

eulermathematicscompetitive-programming
Project Euler Problem 514

A geoboard (of order N) is a square board with equally-spaced pins protruding from the surface, representing an integer

eulermathematicscompetitive-programming
Project Euler Problem 637

Given any positive integer n, we can construct a new integer by inserting plus signs between some of the digits of the b

eulermathematicscompetitive-programming
Project Euler Problem 841

The regular star polygon p/q, for coprime integers p,q with p gt 2q gt 0, is a polygon formed from p edges of equal leng

eulermathematicscompetitive-programming
Project Euler Problem 683

Consider the following variant of "The Chase" game.

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 615

Consider the natural numbers having at least 5 prime factors, which don't have to be distinct.

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 336

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

eulermathematicscompetitive-programming
Project Euler Problem 558

Let r be the real root of the equation x^3 = x^2 + 1.

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 65

The square root of 2 can be written as an infinite continued fraction.

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 278

Given the values of integers 1 < a1 < a2 < dots < an, consider the linear combination q1 a1+q2 a2 + dots + qn an=b, usin

eulermathematicscompetitive-programming
Project Euler Problem 318

Consider the real number sqrt 2 + sqrt 3.

eulermathematicscompetitive-programming
Project Euler Problem 852

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

eulermathematicscompetitive-programming
Project Euler Problem 574

Let q be a prime and A ge B 0 be two integers with the following properties: - A and B have no prime factor in common, t

eulermathematicscompetitive-programming
Project Euler Problem 229

Consider the number 3600.

eulermathematicscompetitive-programming
Project Euler Problem 222

What is the length of the shortest pipe, of internal radius pu{50 mm}, that can fully contain 21 balls of radii pu{30 mm

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 668

A positive integer is called square root smooth if all of its prime factors are strictly less than its square root.

eulermathematicscompetitive-programming
Project Euler Problem 170

Take the number 6 and multiply it by each of 1273 and 9854: By concatenating these products we get the 1 to 9 pandigital

eulermathematicscompetitive-programming
Project Euler Problem 787

Two players play a game with two piles of stones.

eulermathematicscompetitive-programming
Project Euler Problem 258

A sequence is defined as: - gk = 1, for 0 le k le 1999 - gk = g{k-2000} + g{k - 1999}, for k ge 2000.

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 363

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

eulermathematicscompetitive-programming
Project Euler Problem 480

Consider all the words which can be formed by selecting letters, in any order, from the phrase: thereisasyetinsufficient

eulermathematicscompetitive-programming
Project Euler Problem 878

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

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

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

eulermathematicscompetitive-programming
Project Euler Problem 746

n families, each with four members, a father, a mother, a son and a daughter, were invited to a restaurant.

eulermathematicscompetitive-programming
Project Euler Problem 671

A certain type of flexible tile comes in three different sizes - 1 times 1, 1 times 2, and 1 times 3 - and in k differen

eulermathematicscompetitive-programming
Project Euler Problem 610

A random generator produces a sequence of symbols drawn from the set {I, V, X, L, C, D, M, }.

eulermathematicscompetitive-programming
Project Euler Problem 783

Given n and k two positive integers we begin with an urn that contains kn white balls.

eulermathematicscompetitive-programming
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 80

It is well known that if the square root of a natural number is not an integer, then it is irrational.

eulermathematicscompetitive-programming
Project Euler Problem 315

!0315clocks.gif Sam and Max are asked to transform two digital clocks into two "digital root" clocks.

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

An unbiased single 4-sided die is thrown and its value, T, is noted.

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

2^7=128 is the first power of two whose leading digits are "12".

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 725

A number where one digit is the sum of the other digits is called a digit sum number or DS-number for short.

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 812

A dynamical polynomial is a monicleading coefficient is 1 polynomial f(x) with integer coefficients such that f(x) divid

eulermathematicscompetitive-programming
Project Euler Problem 280

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

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 855

Given two positive integers a,b, Alex and Bianca play a game in ab rounds.

eulermathematicscompetitive-programming
Project Euler Problem 207

For some positive integers k, there exists an integer partition of the form 4^t = 2^t + k, where 4^t, 2^t, and k are all

eulermathematicscompetitive-programming
Project Euler Problem 739

Take a sequence of length n.

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 456

Define: xn = (1248^n bmod 32323) - 16161 yn = (8421^n bmod 30103) - 15051 Pn = (x1, y1), (x2, y2), dots, (xn, yn) For ex

eulermathematicscompetitive-programming
Project Euler Problem 634

Define F(n) to be the number of integers x≤n that can be written in the form x=a^2b^3, where a and b are integers not ne

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 60

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

eulermathematicscompetitive-programming
Project Euler Problem 526

Let f(n) be the largest prime factor of n.

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 308

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

eulermathematicscompetitive-programming