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

learn more… | top users | synonyms

4
votes
0answers
45 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 ...
-2
votes
1answer
70 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
155 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
132 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
38 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
23 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
64 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
vote
1answer
38 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
98 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
77 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
292 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
186 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
79 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
78 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
84 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
212 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
192 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
99 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
128 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
52 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
45 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
300 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 $$ ...
2
votes
0answers
78 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
303 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
140 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
67 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
105 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
75 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
496 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
265 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
4k 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
259 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
519 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
230 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
86 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 ...
3
votes
3answers
11k 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 ...
10
votes
1answer
453 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
320 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
197 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
376 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
237 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
1k 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
90 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
307 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
310 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
78 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
110 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
503 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
297 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 ...