# Questions tagged [project-euler]

Project Euler is a series of challenging mathematical/computer programming problems. Please see the site and rules before posting.

155 questions
1answer
50 views

### Formulae to find sum of all digits before n?

I've just started to learn algorithm by joining Project Euler, and trying to understand the below formula ...
0answers
15 views

### Extension of Gold for Pay problem

I've been struggling with an extension of the classical Gold for Pay question and was hoping to get some help with it. I was asked this in an online interview a couple days ago and could solve the ...
1answer
59 views

### What is going wrong with my solution for Project Euler 224?

I am trying to solve the HackerRank version. The problem statement, Let us call an integer sided triangle with sides a ≤ b ≤ c barely obtuse if the sides satisfy $a^2 + b^2 = c^2 - 1$. How ...
1answer
25 views

1answer
149 views

### Stirling numbers and bernoulli numbers for summing up n numbers to the kth power

I am currently working on problem 487 on project euler. I did some research and I only see 2 possibilities to solve this problem: 1. By using faulhabers formula 2. by using the formula featuring the ...
2answers
198 views

0answers
791 views

### Project Euler's, Problem #565

Project Euler's, Problem #565 states: Let $\sigma(n)$ be the sum of the divisors of $n$. E.g. the divisors of $4$ are $1, 2$ and $4$, so $\sigma(4)=7$. The numbers $n$ not exceeding $20$ ...
1answer
86 views

### How many sets correspond to connected graphs

I'm trying to solve this project euler problem. I don't want to get too much help, since that would defeat the purpose, but I'm hitting a wall, so I'm asking a related problem here, from which I'll ...
2answers
114 views

### Possible mis-interpretation in Project Euler #21

Here is the problem statement for Problem 21 of Project Euler. Let $d(n)$ be defined as the sum of proper divisors of $n$ (numbers less than $n$ which divide evenly into $n$). If $d(a) = b$ ...
1answer
3k views

### The largest product of two n-digit numbers which is palindrome

Project Euler: 4 is stated as follows: Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 =...
0answers
210 views

### Game of Nim: Losing Positions [closed]

If you have heard of the game Nim, this is a version of the game. However, in this version, the players can only remove the amount of stones from the pile which is coprime to the current pile size. ...
1answer
606 views

### The 9 most significant digits in Fibonacci series (Project Euler 104)

With regards to project Euler, problem 104: https://projecteuler.net/problem=104 The essence of the question here is how to keep track of the 9 most significant digits of a Fibonacci series (Keeping ...
1answer
238 views

### Project Euler 106: Necessary and sufficient conditions

Problem Statement Let S(A) represent the sum of elements in set A of size n. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the following properties are true:...
2answers
147 views

### Proof that nonconstant polynomial cannot have the same value at all integer points

I am reading the solution to the Project Euler problem 28 here, specifically the one under 'Deriving a non-iterative formula'. That solution first deduces the degree of the polynomial, and then ...
2answers
168 views

### (Soft Question) Is it bad to use Sage built in functions instead of creating my own?

I've been doing Project-Euler just as a way to increase my competency in computer science. I'm currently a Pure and Applied Math major who recently adopted computer science as a minor in order to ...
0answers
230 views

### How to simplify a sum of complex divisors?

This question arises from Project Euler 153. That problem asks for the sum of all complex divisors of all natural numbers up to a maximum, where a complex divisor is a complex number of the form a + ...
1answer
2k views

### Project Euler, Problem #529 10-substrings

Have anyone tried the problem 529? I tried but I'm confronted to a very high complexity $O(N^2)$ with $N$ being the length of the number. The code is: ...
1answer
67 views

### Statement from explanation of “What is the smallest number divisible by each of the numbers 1 to 20?” on Project Euler

Here is part of explanation from the PE problem 5: Let us consider the case of finding the least value of $N$ for $k=20$. We know that $N$ must be divisible by each of the primes, $p[i]$, less than ...
2answers
837 views

### Expected value of a guessing game

I'm trying to solve project euler 527, I don't understand how the expected value of B(6) is taken. A secret integer t is selected at random within the range 1 ≤ t ≤ n. The goal is to guess the ...
2answers
257 views

### Explaining solution of Project Euler problem #5

Here is the problem. Pretty simple to brute force, but more gently solutions are not that easy to understand, and I'm not talking about programming issue, but math-affiliated. For example, I'm ...
0answers
144 views

### About an answer given for Project Euler 19

The problem is here and someone gave this answer but I don't understand it even if I know the rule of large numbers. If you want to write a code for this, it is really boring. On the other hand, if ...
0answers
531 views

### Project Euler Problem #87 - Prime power triples

I found this problem in Project Euler: https://projecteuler.net/problem=87 The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is $28$. In fact, there ...
1answer
159 views

### Finding the last nonzero digit of the factorial of a large number

This problem is from projecteuler problem 160. I am not looking for an answer or anything like that I just got stuck on some of the mathematics and am looking for some help. Instead of solving the ...
1answer
174 views

### Summation of a function

Let $n$ is a positive integer. $n = p_1^{e_1}p_2^{e_2}...p_k^{e_k}$ is the complete prime factorization of $n$. Let me define a function $f(n)$ $f(n) = p_1^{c_1}p_2^{c_2}...p_k^{c_k}$ where \$c_k = ...
2answers
637 views

### square of digits - why does it always contain 1 or 89 [closed]

I attempted project euler problem 92, while I passed it, my solution works, but had just...awful performance. So I would like to try again tomorrow. In the meantime understanding why the iteration ...
1answer
131 views

### Where is my formula false??

I wrote a formula that returned how many numbers in a given row of pascals triangle are divisible by a given prime. This formula was created to answer https://projecteuler.net/problem=148. I was ...