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

learn more… | top users | synonyms

0
votes
1answer
43 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 ...
-1
votes
0answers
25 views

Lowest multiple of N with only 1 and 2 digits

Given a integer N how can quickly find the lowest N multiple such that only contains 1 and 2 in its decimal representation, for example Given 8 the answer would be 112. So far I've tried to use ...
1
vote
1answer
30 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
90 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
0
votes
3answers
71 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 ...
4
votes
0answers
259 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 ...
0
votes
1answer
148 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
68 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\\ ...
2
votes
0answers
76 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: $$ ...
0
votes
1answer
73 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 ...
1
vote
3answers
184 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. ...
2
votes
3answers
133 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 ...
1
vote
1answer
74 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 ...
-4
votes
2answers
105 views

Find the sum of all multiples of 7 or 17 under 522 [duplicate]

This is a variant of the first problem in project euler.
2
votes
1answer
51 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!
1
vote
1answer
38 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
169 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
41 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 $$ ...
2
votes
0answers
70 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 ...
1
vote
3answers
228 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
122 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
65 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
92 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 ...
0
votes
1answer
74 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 ...
0
votes
2answers
297 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
218 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$). ...
9
votes
3answers
3k 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
164 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 ...
2
votes
1answer
393 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 ...
1
vote
2answers
183 views

“Goldbach's other conjecture” and Project Euler - writing 1 as a sum of a prime and twice a square

From Problem 46 of Project Euler : It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square. $$9 = 7 + 2 \cdot ...
0
votes
1answer
78 views

Non-Recursive Fundamental Recurrence Formulas

Is there a non-recursive version of the fundamental recurrence formulas for continued fractions? I am trying to compute $A_{1000}$, and it is taking me an extremely long time. By the way, I am ...
2
votes
3answers
8k 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 ...
9
votes
1answer
290 views

How to find the smallest number with just $0$ and $1$ which is divided by a given number?

Every positive integer divide some number whose representation (base $10$) contains only zeroes and ones. One can easily prove that using pigeonhole principle. ...
3
votes
1answer
261 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$ ...
1
vote
2answers
166 views

Longest antichain of divisors

I Need to find a way to calculate the length of the longest antichain of divisors of a number N (example 720 - 6, or 1450 - 4), with divisibility as operation. Is there a universally applicable way to ...
1
vote
1answer
361 views

Project Euler $420$ [closed]

So the question is: We define $F(N)$ as the number of the $2\times 2$ positive integer matrices which have a trace less than $N$ and which can be expressed as a square of a positive integer matrix ...
2
votes
2answers
217 views

Project Euler Problem 65

I am working on solving Project Euler problem #65 and run upon the following statement: What is most surprising is that the important mathematical constant, e = [2; 1,2,1, 1,4,1, 1,6,1 , ... , ...
1
vote
3answers
721 views

Find smallest multiple of specific set of numbers

I was trying to solve the 5th problem on project-euler.net, wich is finding the smallest number wich was multiple of each number in a specific set, in this case, $[1 ... 20]$. First I thought of was ...
0
votes
1answer
74 views

quick approximation for largest fibonacci under a limit?

I asked in a previous post about finding a closed form for: $$\sum_{i=0}^{n}F_{3i}$$ which is the sum of the even fibs less than or equal to the nth even fib. the great answersI got showed me a very ...
5
votes
3answers
249 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} $$ ...
2
votes
1answer
223 views

How to get Euler angles with respect to initial Euler angle

I have a sensor which gives me Euler angles (roll,pitch,yaw). There is a baseline value of Euler angle (assume it is $5,10,15$) at the beginning.I want to calibrate from this baseline values all ...
2
votes
2answers
77 views

Combinatorical meaning of an identity involving factorials [duplicate]

While solving (successfully!) problem 24 in projectEuler I was doodling around and discoverd the foloowing identity: $$1+2\times2!+3\times3!+\dots N\times N!=\sum_{k=1}^{k=N} k\times k!=(N+1)!-1$$ ...
4
votes
0answers
108 views

Why limit Euler's Partition function P to $k\leq\sqrt n$ instead of $k\leq n$?

I solved a Project Euler problem (I won't say which one) involving the Partition Function P. I used equation #11 from the above link: $$P(n) = \sum_{k=1}^n (-1)^{k+1}\bigg(P\Big(n-{1\over ...
4
votes
2answers
401 views

using markov chains to solve a project-euler problem?

I never learned what markov chain is, but from googling it seems like if there are finite states and each state has probabilities to jump to other states, I can use markov chain. What I'm on is ...
1
vote
1answer
267 views

Searching for pandigital numbers

I was working on the Euler project's problems and the 32nd problem is the following: We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for ...
0
votes
5answers
460 views

Every odd composite $=$ prime ${}+ 2x^2$

I was looking through some project-euler questions and I came across one that said Every odd composite number can be written as the sum of a prime and twice a square...This was proven false. ...
6
votes
3answers
8k 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: ...
4
votes
3answers
1k views

10 most significant digits of the sum of a 100 50-digit numbers

This is about Project Euler #13. You are given a 100 50-digit numbers and are asked to calculate the 10 most significant digits of the sum of the numbers. The solution threads stated that we are only ...
8
votes
0answers
544 views

How many integer solutions to a diophantine equation

Starting with the equation: $\frac{1}{a}+\frac{1}{b}=\frac{p}{10^n}$, I reached the equation: $10^{n-log(p)} = \frac{ab}{a+b}$. Now given the positive integer $n$, for what integer values of $p$ ...
3
votes
2answers
244 views

Solving $x^2 \cdot y^2 + x^2 + y^2 = c^2$ with $x$, $y$, $c \in \mathbb{Z}^+$

I am working on Project Euler 390. The question is about triangles, and finding the area of a triangle with sides $\sqrt{a^2+1}, \sqrt{b^2+1}$ and $\sqrt{a^2+b^2}$, with $a, b \in \mathbb{Z}$. I have ...