Algorithmic mathematics
50 original programming-style mathematics puzzles in number theory, digit algorithms, combinatorics, dynamic programming, paths and geometry. Solve using any method; submit only the final integer, not code.
50 active competition problems in this category. Select Load more problems to see the next set.
Algorithmic mathematics problems
- GCD checksumCompute S = gcd(1,840)+gcd(2,840)+...+gcd(50000,840). Submit S modulo 1000003.Read and solve →
- Odd totient multiplesHow many odd integers n with 3<=n<=50000 have Euler totient phi(n) divisible by 12?Read and solve →
- Prime-sum divisor partnersCount n in 2..75000 for which there exist two different positive divisors a<b of n with a*b=n and a+b prime. (The pair must multiply to n.)Read and solve →
- Coprime digit-sum filterSum all integers n from 1 through 200000 for which gcd(n,2310)=1 and the sum of the decimal digits of n is divisible by 5. Return the total modulo 1000003.Read and solve →
- Divisible dice productsThree distinguishable dice each show an integer from 1 to 12. How many ordered triples (a,b,c) have a+b+c=20 and a*b*c divisible by 5?Read and solve →
- Four draws with parity balanceA 4-tuple (a,b,c,d) is drawn from {1,2,...,20} with replacement and order matters. How many 4-tuples have a+b+c+d divisible by 7 and exactly two even entries?Read and solve →
- Box-constrained returning walksA walker starts at (0,0). At each of 8 steps it moves one unit up, down, left, or right. How many ordered step sequences return to (0,0) after step 8 while NEVER leaving the box -2<=x<=2, -2<=y<=2?Read and solve →
- Letters under three rulesCount length-7 strings over A, B, C, D such that A occurs exactly twice, no two Bs are adjacent, and C occurs STRICTLY more often than D.Read and solve →
- Spacing lottery sumsChoose exactly twelve distinct integers from {1,2,...,100}. How many subsets have no two consecutive integers and their sum divisible by 11? Return the exact count, without a modulus. Order is irrelevant.Read and solve →
- Colored annulus pointsCount integer lattice points (x,y) with 0<=x,y<=100 satisfying 900 < (x-45)^2+(y-55)^2 <= 1600 and x+y divisible by 3.Read and solve →
- Primitive hypotenuse pairsCount pairs of integers (a,b) with 1<=a<b<=500, a+b<=600, gcd(a,b)=1, and a^2+b^2 a perfect square.Read and solve →
- Visible points on diagonal stripesHow many integer lattice points (x,y) with 1<=x<=200 and 1<=y<=250 satisfy gcd(x,y)=1 and x+2y divisible by 7?Read and solve →