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
- Prime digits checksumFor each prime p at most 75000, keep p if the sum of its decimal digits is also prime. Return the sum of all kept primes, modulo 1000003.Read and solve →
- Special eight-step prime gapsFor primes p and q that are consecutive in the increasing list of ALL primes, count pairs with p < 100000, q-p = 8, and the final decimal digit of p equal to 9. The value of q may exceed 100000.Read and solve →
- Linear congruential jumpDefine x_0 = 37 and x_(n+1) = (61*x_n + 17) mod 1000003. Calculate x_200000.Read and solve →
- Four-clock alignmentFind the smallest nonnegative integer x such that x mod 11 = 5, x mod 13 = 7, x mod 17 = 9, and x mod 19 = 0.Read and solve →
- Alternating parity milestoneA positive integer is parity-alternating if its first (most significant) digit is odd and every following digit has parity opposite to the digit before it. What is the 500th smallest parity-alternating positive integer?Read and solve →
- Two-base mirrors with a checksumCount positive integers n < 1000000 that are palindromes both in base 10 and in binary (without leading zeroes) AND whose decimal digit sum is divisible by 3.Read and solve →
- Seven-number target subsetsHow many distinct seven-element subsets of {1,2,...,24} have elements summing to exactly 100? Order within each subset does not matter.Read and solve →
- Zero-pair access codesHow many six-digit sequences over digits 0,1,2,3,4 have a nonzero first digit, exactly two occurrences of 0, and no equal adjacent digits? Leading zeroes are not allowed.Read and solve →
- Separated triomino tilingsTile a row of 50 unit cells with tiles of lengths 1, 2, or 3. Count tilings containing at least one length-3 tile in which no two length-3 tiles are consecutive (there must be at least one other tile between them).Read and solve →
- Distinct square-sum portfoliosHow many ways can 500 be written as a sum of exactly five DISTINCT positive perfect squares? Different orders of the same five squares count once.Read and solve →
- Second-order oscillator modulo a primeDefine b_0=5, b_1=11, and b_n=(4*b_(n-1)-b_(n-2)) mod 1000003 for n>=2. Find b_50000.Read and solve →
- Quadratic orbit checkpointSet x_0=1 and x_n=(x_(n-1)^2+37) mod 65521 for n>=1. How many indices n in 1..100000 satisfy x_n divisible by 11?Read and solve →