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
- Four-factor digit targetFind the smallest integer n strictly greater than 100000 whose prime factorization contains exactly four DISTINCT prime factors and whose decimal digits sum to 19. Exponents do not count toward the number of distinct prime factors.Read and solve →
- Coincident modular cyclesHow many integers n with 1 <= n <= 1000000000000 satisfy both 7^n congruent to 1 modulo 1013 and n congruent to 2 modulo 9?Read and solve →
- Far-apart decimal neighborsCount seven-digit positive integers in which neighboring digits differ in value by at least 3 and the sum of the seven digits is divisible by 9.Read and solve →
- Balanced runs without fourCount binary strings of length 35 containing exactly seventeen 1s, with no occurrence of 0000 or 1111. Strings may begin with 0.Read and solve →
- Distinct odd partitionsHow many ways can 1000 be expressed as a sum of DISTINCT positive odd integers? Order is irrelevant. Return the number of ways modulo 1000000007.Read and solve →
- Fibonacci residues that are squaresUse F_0=0, F_1=1 and F_n=F_(n-1)+F_(n-2). For how many indices n with 1<=n<=1000000000000 is F_n modulo 997 a quadratic residue modulo 997? Include residue 0 as a square.Read and solve →
- Even-color twin-station coverageFor every lattice point (x,y) with integer coordinates 0<=x,y<=1000000000, consider Manhattan distances to A=(310000000,410000000) and B=(310180000,410090000). How many points have distance at most 250000 from at least one station AND satisfy x+y even? Count each point only once.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 →
- 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 →
- Interior lattice points of a survey polygonA simple polygon has vertices (2,2), (70,9), (88,47), (51,96), (12,80), in that cyclic order. How many integer lattice points lie STRICTLY inside it (not on its boundary)?Read and solve →