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

learn more… | top users | synonyms

3
votes
4answers
9k views

How to calculate reflected light angle?

On a two dimensional plane, line $X$ is at an angle of $x$ radians and an incoming light travels at an angle of $y$ radians. How can I calculate the angle of the outgoing light reflected off of the ...
1
vote
1answer
281 views

Algorithm for generating an ordered list of pair products

For problem 4 in the euler project part of the assignment is to generate a list of products of 3-digit numbers. The easy way is to just do a cartesian product (I think it's called), and after that ...
1
vote
1answer
29 views

Find the sum of all the multiples of 3 or 5 below 1000 (Break down)

I know that this has been posted before but I can't grasp how it actually works. I'm a 16 year old in the 10th grade and am interested in algorithms. I've looked in multiple places on the web but am ...
3
votes
0answers
32 views

How to compute a slowly converging series to 10 decimals places of accuracy?

I'm looking at a Project Euler problem, where a harmonic series is modified such that it excludes terms where a digit appears three times consecutively in the denominator. So this series would exclude ...
3
votes
2answers
4k views

Combinations/Permutations Count Paths Through Grid

I am curious about a situation in permutations/combinations. This question stems from a challenge site (project euler, problem 15) and research found on this exchange and elsewhere. The question ...
4
votes
1answer
125 views

Are there any mathematics “problem websites” similar to Project Euler?

Are there any mathematics websites similar to Projet Euler, a website which hosts math-heavy programming questions, many of which can be solved with a pen and paper? I've become almost addicted to ...
0
votes
1answer
61 views

Largest prime factor of a number

In Project Euler problem 3, where we have to find the largest prime factor of a number, one of the solution i came across is ...
4
votes
0answers
51 views

Computing question: A quadratic which gives primes [closed]

This is about Project Euler Problem 27. The question is: Considering quadratics of the form $n^2 + an + b$, where $\lvert a \rvert < 1000$ and $\lvert b \rvert < 1000$ Find the product ...
-7
votes
1answer
101 views

Project Euler - task №390.

When this task was not clear what the equation to be solved. This equation? $x^2y^2+z^2y^2+x^2z^2=r^2$ in integers. It is not clear, because this equation is quite simple and I do not think that ...
2
votes
1answer
595 views

maths required to complete project euler

What math's will help one complete all if not most of project Euler questions? Last I've attempted project Euler I could not understand the questions/vocabulary, etc., and could only complete a few ...
2
votes
1answer
204 views

Find the sum of all n, 0 < n < 64,000,000 such that σ2(n) is a perfect square.

I have been working on Project Euler problem 211 for quite some time, and I am stuck. I'm not looking for an answer, I'm simply looking for some guidance. I've written and tested the following code, ...
1
vote
4answers
147 views

Sum of $x^x$ final 10 digits

warning/spoiler alert this problem occurs in the euler project. I want to find the last ten digits of the following sum: $$ S = 1^1 + 2^2 + 3^3 + 4^4 + \cdots + 1000^{1000} $$ Finding this ...
0
votes
1answer
45 views

Number of paths through a grid

I am attempting to solve Project Euler prob. 204 by hand, and I decided that this method should help a lot. I have the following grid: The numbers indicate the total number of paths from a node at ...
0
votes
2answers
26 views

What rules can I apply for divisible numbers?

I'm trying to solve Project Euler problem 12. I've figured out a fast algorithm for the triangle numbers, but to see if they are devisable is just a pain... ...
0
votes
1answer
75 views

How does this algorithm find the largest prime factor?

This question on math.stackexchange details an algorithm that can be used to find the largest prime factor of a number. I used it to solve Project Euler #3. Here's a short description of the ...
4
votes
0answers
321 views

Counting simple quadrilaterals in a rectangular lattice.

I've been trying to make an algorithm to find the number of all possible simple quadrilaterals in a N*M lattice. I already have a brute force solution but since this is a Project Euler problem I ...
1
vote
1answer
46 views

Digit Factorial Sum? [duplicate]

This question is founded in Project Euler #34. I originally solved the problem years ago but now I'm moving all the problems over to a new language. As I revisit this problem, I already know the ...
2
votes
1answer
102 views

How to find all pairs $(a, b)$ s.t. $(a^2+b^2)/\gcd(a,b) \leq n$ for constant $n$?

Any help is appreciated, this is for my work on http://projecteuler.net/problem=153. Also posted here
2
votes
4answers
24k views

Find the sum of all the multiples of 3 or 5 below 1000

How to solve this problem, I can not figure it out: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of ...
5
votes
3answers
361 views

Closed form for the sum of even fibonacci numbers?

I recently took a look a project euler, and I am trying to think of a smart way to do number 2. I looked at the sequence, and I saw that the question is basically asking for $$ \sum_{i=1}^n F_{3i} $$ ...
0
votes
3answers
80 views

Why does $n^2 \equiv 10 \pmod{30}$ imply $n \equiv 0 \pmod{10}$?

It seems that $n^2 \equiv 10 \pmod{30} \iff n \equiv 0 \pmod{10}$. I found this by calculating $\{n \in \mathbb N_0 \mid n < 30 \land n^2 \equiv 10 \pmod{30}\} = \{10, 20\}$, and noting that 10 ...
0
votes
1answer
218 views

Project Euler #453 confusion

So I decided to give a shot on the #453 project euler problem but there is something that confuses me with the numbers given. I decided to start by calculating the possible arrangements of 4 vertices ...
0
votes
1answer
102 views

period of recurring decimals

The period of a recurring decimal fraction $1/d$ is equal to the multiplicative order of $10$ mod $d$. For fractions with even period, the digits sum to 9 i.e. $1/7 = 0.(142857)...$ $$142\\ 857\\ ...
6
votes
3answers
12k views

Find the largest prime factor

I just "solved" the third Project Euler problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? With this on Mathematica: ...
3
votes
1answer
388 views

taking the log of $a^b$ (Project Euler problem 29)

I've been stuck on Project Euler problem 29 and thus asked a friend who solved it how to do it. What he basically did was for each power was: $\left(\frac{\log_{10}(a)}{\log_{10}(2)}\right)\cdot b$ ...
0
votes
1answer
115 views

How to find positive integers where the multiplicative modular inverse is equal to itself for mod n?

This a question sparked from Project Euler Question. I really devoted so much time to search an efficient solution however no output. What are some possibles theorems or formulas that are useful in ...
2
votes
0answers
85 views

Is there a closed-form or an efficient way to calculate $\sum_{i=1}^{N/2} i(N \mod i) $

I am trying to solve problem 401 of Project Euler, without giving much away, I have broken down the problem into several summations and I am trying to calculate one part, which is: $$ ...
1
vote
1answer
158 views

repunit prime factors

So I am working on this problem... which states: A number consisting entirely of ones is called a repunit. We shall define R(k) to be a repunit of length k; for example, R(6) = 111111. Let ...
1
vote
3answers
225 views

could not able to understand Project Euler 18. “Maximum path sum I”

According to question, By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. ...
4
votes
3answers
324 views

Project Euler - 34 / Find a mathematical approach for upper bound

145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: as 1! = 1 and 2! = 2 are not sums ...
-4
votes
2answers
165 views
7
votes
3answers
723 views

Project Euler Question 222

Would I be wrong to assume that the solution to this problem: What is the length of the shortest pipe, of internal radius 50mm, that can fully contain 21 balls of radii 30mm, 31mm, ..., 50mm? ...
4
votes
3answers
15k views

Largest prime factor of 600851475143 [duplicate]

I'm trying to use a program to find the largest prime factor of 600851475143. This is for Project Euler here: http://projecteuler.net/problem=3 I first attempted this with the code that goes through ...
2
votes
1answer
54 views

An Euler problem: How many of these numbers are of the form $a^b$?

How much numbers can be written in the form $a^b$, where $a$ and $b$ are integers that are between $2$ and $100$? How can I start this problem? Any hints please? Thanks!
3
votes
2answers
210 views

Faulty logic when summing large integers?

This is in relation to the Euler Problem $13$ from http://www.ProjectEuler.net. Work out the first ten digits of the sum of the following one-hundred $50$-digit numbers. ...
1
vote
1answer
51 views

Heronian isosceles triangles

This is a problem from Project Euler, problem 94. The problem asks about isosceles triangles with integer sides (differing by 1 unit, e.g, 5-5-6) and integer area, which are known to be Heronian ...
0
votes
1answer
478 views

Last digits of factorial

Yes, this is an attempt to understand why my solution for Project Euler problem 160 isn't working. I hesitate to post my code lest I offer a solution to someone else. The problem is to find the last ...
0
votes
0answers
44 views

Make iteration functional?

I'm working in a theoric approach to project-euler's problem #38. This problem consists in finding the largest integer such that $n$, for example $192$: $$ 192 * 1 = 192 $$ $$ 192 * 2 = 384 $$ ...
4
votes
2answers
217 views

Solving $\phi (n) < (n-1) \cdot \frac{15499}{94744} $

I am working on challenge 243 from Project Euler (PE 243). The question is: $$\text{Solve } \phi (n) < (n-1)\cdot \frac{15499}{94744}$$ I can calculate $\phi(n)$ for any $n$, but I think the $n$ ...
2
votes
0answers
84 views

Need to find a better algorithm to solve a project euler problem dealing with coprime pairs.

I've been working on this for a while and found several solutions so far, but none are fast enough to find the necessary $S(10^7)$. Here is the question: For an integer $M$, we define $R(M)$ as ...
0
votes
1answer
79 views

Finding a generating function for a pattern

I was working on this projecteuler.com problem, and I was very interested by the premise. Essentially, given n terms, find an ...
2
votes
3answers
378 views

Project Euler's Problem Number 88

I am tackling Project Euler's problem number 88, which in a nutshell reads: Let $S_n$ be the set of sequences of natural numbers $(s_1,s_2,...,s_n)$ where $s_1\leqslant s_2\leqslant\cdots\leqslant ...
1
vote
0answers
172 views

Magic Square Combinatorics

This question has been noted to be close to a Project Euler question. Please Help me with this question:Considering a 4*4 magic square ,How many ways are there to fill each square with an integer ...
0
votes
1answer
68 views

In a Pythagorean triplets, is $a + b$ always greater then $c$?

I have a looked around, but the answer is nowhere to be found.
1
vote
2answers
109 views

CS problem, turned to mathematics

I am trying to solve some of the projecteuler problems using a much of a programmers approach. However, I would like to get more into the math, and therefore would try to do some mathematical ...
1
vote
2answers
690 views

Want to classify project euler problem 31

I was thinking about Project Euler #31 yesterday, quoted below: In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: 1p, 2p, 5p, ...
-1
votes
1answer
303 views

Sum of number of divisors of multiples of squares

I wish to evaluate, for some large $N$, $$\sum_{k=1}^N \tau(c\cdot k^2)$$ where $c$ is a positive integer constant, and $\tau(n)$ is the number of positive divisors of $n$ (i.e. $\tau = \sigma_0$). ...
4
votes
2answers
239 views

Does “triangle” in English exclude degenerate triangles?

Just for fun read few problems on the projeteuler.net website. Number 276 found interesting: Consider the triangles with integer sides a, b and c with a ≤ b ≤ c. An integer sided triangle ...
9
votes
3answers
6k views

Find the sum of the digits in the number 100!

I am working on a Project Euler problem http://projecteuler.net/problem=20. $n!$ means $n(n - 1)\dots...3.2. 1.$ For example, $10!$ $=$ $10$ $9$ $...$ $3$ $2$ $1$ $=$ $3628800$, and the ...
1
vote
1answer
365 views

Algorithm to find greatest significant digit of long integer

I'm doing a project euler problem (http://projecteuler.net/problem=40) that requires iteration of each digit of a set of increasing integers, in order. I solved it by converting each integer to a ...