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
2answers
5k 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 ...
7
votes
3answers
894 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? ......
3
votes
2answers
5k views

Generating Numeric Palindromes.

I have just started the Euler project, and felt like I didn't get the fourth problem right...I used string conversion to test if my numbers were symmetrical, instead of relying on (the much faster) ...
12
votes
1answer
1k views

Comparing powers without logarithms

Related to this question and this Project Euler problem (Problem 99), I came up with a recursive algorithm for comparing two numbers of the form $x^y$ (with $x>1$ and $y\ge 0$) without explicit use ...
2
votes
0answers
345 views

Bell-like recurrence

Let $$A(n)=\sum_{k=0}^{n-1}\binom{n}{k}A(k)+n!,\quad A(0)=1$$ $$B(n)=\sum_{k=0}^{n-1}\binom{n}{k}B(k)-n!-n!\sum_{k=1}^{n}\frac{1}{k!},\quad B(0)=-1.$$ I'm interested in computing $S(n)=A(n)+B(n)$ ...
0
votes
1answer
136 views

What is the max possible value of the sum of power of y of each digits?

I'm trying to solve the 30th euler problem. My code is working, but I'm not sure if it's luck or ingeniousness. To be the most efficient, I want to reduce at the maximum the numbers to checks. I ...
0
votes
2answers
303 views

What is wrong with my algorithm (finding if the origin is within a triangle's interior)?

I am working on Project Euler Problem 102 and I thought I had a solution, but it seems I do not. Now, don't give me the solution. I know I'm on the right track. What I want to know is why my method ...
2
votes
2answers
2k views

Computing Non-zero End Digits of Large Factorials

Any large factorial will have a number of zero behind it, and one could write an expression to compute the number of trailing zeros, but how would one go about computing the non-zero end digits? E.g. ...
2
votes
1answer
1k views

Project Euler 215 - Solving with Sparse Matrices and Vector Multiplication

I wrote a program to solve Project Euler Problem #215 (see below for description) using memoization, and when I got access to the PE forums, I saw everyone else wrote programs that also used dynamic ...
2
votes
1answer
482 views

How is this probability found (project euler #121)?

In the problem statement of project Euler problem 121, the following information is given: A pouch contains one black chip and one white chip. In a simple game, one player takes a chip at random and ...
3
votes
0answers
770 views

Project Euler Problem 338

I'm stuck on Project Euler problem 338. This is a cross post from StackOverflow where I initially posted, however, it was suggested that I post it here too since the problem mostly relies on math. The ...
37
votes
7answers
4k views

Project Euler, Problem #25

Problem #25 from Project Euler asks: What is the first term in the Fibonacci sequence to contain 1000 digits? The brute force way of solving this is by simply telling the computer to generate ...
0
votes
1answer
662 views

How many routes are there through from top left corner to top right in a 20x20 grid? Binomial Coefficent explanation [duplicate]

Possible Duplicate: Counting number of moves on a grid I'm trying to solve this computer programming problem on Project Euler: http://projecteuler.net/index.php?section=problems&id=15 ...
1
vote
2answers
762 views

Project Euler analyzing and simplifying problem 33

These questions concern "Project Euler problem 33": The fraction $\displaystyle \frac {49}{98}$ is a curious fraction, as an inexperienced mathematician in attempting to simplify it may ...
1
vote
0answers
404 views

Number of closed paths formed by arcs of one fifth of a circle

**I was trying to solve the following issue: Find the number of possible closed paths using one fifth of an arc ($72^o$), where at each time step we can move either clockwise or anti-clockwise. in ...
2
votes
2answers
99 views

Need a nudge in the right direction - How do I find the total number of permutation with 3 consecutive characters?

Again, I really just want a nudge in the right direction. Possibly a large nudge, but not the straight forward answer. I am trying to figure out how to solve Project Euler Problem 191. I believe I ...
4
votes
3answers
795 views

Primitive integer triangles

Consider the triangles with integer sides $a$, $b$ and $c$ with $a \leq b \leq c$. An integer sided triangle $(a,b,c)$ is called primitive if $gcd(a,b,c)=1$. How many primitive integer sided triangles ...
3
votes
2answers
1k views

Combinatorial counting

This question is about Project Euler 113: Working from left-to-right if no digit is exceeded by the digit to its left it is called an increasing number; for example, 134468. Similarly ...
10
votes
4answers
70k 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 ...
4
votes
4answers
13k 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 ...
3
votes
2answers
231 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. $...