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

learn more… | top users | synonyms

1
vote
0answers
326 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
72 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
128 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
90 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 ...
1
vote
2answers
1k 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, ...
11
votes
3answers
11k 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
974 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 ...
3
votes
1answer
1k 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
3answers
532 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
102 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 ...
9
votes
3answers
31k 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 ...
14
votes
1answer
4k 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
583 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$ ...
2
votes
2answers
404 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
746 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
395 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
3k 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
340 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 ...
6
votes
3answers
764 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} $$ ...
4
votes
1answer
824 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
92 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
116 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
830 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
582 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
825 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. ...
7
votes
4answers
19k 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: ...
6
votes
3answers
2k 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 ...
10
votes
0answers
855 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
339 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 ...
4
votes
2answers
256 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$ ...
0
votes
4answers
313 views

Identifying which “plain text” is in English

I need to identify which text is in English from a list of possible list of plain texts generated from a brute force attack on a cipher text. I am thinking of using frequency distributions of English ...
6
votes
4answers
2k views

The longest sum of consecutive primes that add to a prime less than 1,000,000

In Project Euler problem $50,$ the goal is to find the longest sum of consecutive primes that add to a prime less than $1,000,000. $ I have an efficient algorithm to generate a set of primes ...
1
vote
1answer
359 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
2answers
108 views

Compute $\sum_0^{n-1}2^i11^{n-i-1}\bmod10^9$ when $n=13^{17}$

Given the following function $f$ $f(1)=1$ $f(n)=11\cdot f(n-1)+2^{n-1}$ I would like to compute $f(13^{17})\mod 10^9$ and ended up using the following : $f(n)=\sum_{i=0}^{n-1}({11^{n-(i+1)}\cdot ...
2
votes
1answer
1k views

Primality and repeated digits

I recently worked on problem 51 through project euler, I solved it essentially through brute-force but afterwards I viewed the forum and there were some more clever solutions. For those unfamiliar ...
1
vote
2answers
138 views

Steps to get Inverse of Pentagonal

I have solved http://projecteuler.net/problem=44 by getting the inverse equation from Wikipedia http://en.wikipedia.org/wiki/Pentagonal_number: Pentagonal: $f(n) = \frac{n(3n - 1)}{2}$ Inverse ...
1
vote
1answer
2k views

How to find large prime factors without using computer?

What is the largest prime factor of the number 600851475143 ? This is the third problem of Project Euler. How to approach this mathematically (without computer programming) ?
3
votes
2answers
4k views

sum of even-valued and odd-valued Fibonacci numbers

I was solving the Project Euler problem 2 *By starting with 1 and 2, the first 10 terms of Fibonacci Series will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... Find the sum of all the even-valued terms ...
0
votes
1answer
160 views

Euler's Numerical method help

Consider this differential equation, $dy/dx = x + \sin(y)$ with initial condition $y = 0.5$ when $x = 1.2$: Write down the recurrence relation for Euler's numerical method ...
2
votes
1answer
926 views

Finding all possible paths from one corner to the other on a grid, without backtracking

Me again "new to maths guy". Please tell me if the substance of my questions are not a good fit for the site. I'm now onto Question 15 of Project Euler and it seems like there's some mathematical ...
2
votes
1answer
815 views

How to find the factors of numbers around 1e7?

I don't have a maths background but I'm solving problems on the awesome Project Euler .net in JavaScript as programming practice. I don't want to link directly to the question or post it verbatim ...
2
votes
0answers
503 views

Counting couples having least common multiple less than a number

Let f(n) be the number of couples (x,y) with x and y positive integers, $x\leq y$ and the least common multiple of x and y equal to n. Let g be the summatory function of f, i.e.: $g(n) = ...
1
vote
1answer
388 views

How does $P(n)$ (Partition Function P) work?

I am trying to do Project Euler #78, which is about the different ways of splitting up coins into piles. I realized that this is just the number of integer partitions of the number of coins, ...
4
votes
1answer
2k views

Comparing Powers with Different Bases Using Logarithms?

I looked all over to see if a question like this had already been answered, but I couldn't find it. So here goes: I need a general formula for comparing two (insanely huge) powers. I'm pretty sure ...
5
votes
2answers
412 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 ...
2
votes
1answer
1k views

Project Euler Problem 371

Project Euler Problem 371 states Oregon licence plates consist of three letters followed by a three digit number (each digit can be from [0..9]). While driving to work Seth plays the following ...
2
votes
1answer
905 views

For what kind of numbers would $r_2(n^2) = 420$?

I am trying to find all of the answers to $r_2(n^2) = 420$, where $N < 10^{11}$. It is for finding lattice points on a circle with points $(0,0), (N,0), (0,N)$, and $(N,N)$. I am (pretty) sure that ...
4
votes
4answers
908 views

Flaw in expected value solving logic (Project Euler 323)

The problem statement for Project Euler #323 is as follows: Let $y_0, y_1, y_2, ...$ be a sequence of random unsigned 32 bit integers (i.e. $0 \leq y_i < 2^{32}$, every value equally likely). ...
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
891 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? ...