Skip to main content

Questions tagged [project-euler]

Use this tag for questions that came from the Project Euler website.

0 votes
1 answer
131 views

How could this Project euler question be written in mathematica? [closed]

I defined a,b,c as a=m^2-n^2, ...
Aran's user avatar
  • 373
1 vote
2 answers
109 views

What would be another way to write this code in mathematica

What would be another way to write this code in mathematica,but without using the code for and if? Is integer digits necessary foor this type of code? ...
Aran's user avatar
  • 373
0 votes
1 answer
173 views

How do we find how many values for a Smooth square root?

this question is from the Eulers project The positive integer is called square root smooth if all of the prime factors it has are less than its square root. Including the number 1, there are 29 square ...
Aran's user avatar
  • 373
4 votes
2 answers
1k views

How to solve this problem 710 of Project-Euler

I want to solve this problem: The number 6 can be written as a palindromic sum in exactly eight different ways: (1,1,1,1,1,1),(1,1,2,1,1),(1,2,2,1),(1,4,1),(2,1,1,2),(2,2,2),(3,3),(6) We shall define ...
A little mouse on the pampas's user avatar
0 votes
1 answer
188 views

How to solve problem 599 of Project-Euler

Problem 599 of the Project-Euler is described as follows: The well-known Rubik's Cube puzzle has many fascinating mathematical properties. The 2×2×2 variant has 8 cubelets with a total of 24 visible ...
A little mouse on the pampas's user avatar
1 vote
0 answers
108 views

Integer linear programming can't find global minimum

I was working with Project Euler Problem 418 using Mathematica and got in trouble. I wrote a function to find the unique factorization triple which minimizes c / a for integer n. ...
李子涵's user avatar
  • 368
3 votes
1 answer
348 views

Generation of Step Numbers

I am working on Project Euler 178 but got stuck in trying to optimize my code. The following text comes from the problem: Consider the number $45656$. It can be seen that each pair of ...
Lonidard's user avatar
  • 645
1 vote
1 answer
237 views

How to loop through a large number in mathematica

I am trying to find all divisors of 200! [Project Euler, problem 608 - in case anybody is curious]. It has many divisors and hence using ...
babbupandey's user avatar
1 vote
1 answer
75 views

Converting sequece of code into a function [closed]

I constructed a pretty basic sieve of Eratosthenes and would like to use it as a function rather than copy pasting output, how do I achieve ...
Anvit's user avatar
  • 131
5 votes
1 answer
313 views

How to simulate a Disk operation in a good way?

I want to simulate an operation on a disk, originally specified in project-euler problem #566. Here is a description of the problem. I want to simulate a disk with arbitrary partitions, but only two ...
vapor's user avatar
  • 7,921
8 votes
2 answers
199 views

How to implement this simple procedural style algorithm efficiently in Mathematica style code?

I am trying to move my C solution code for project euler problem 135 to Mathematica. But I encountered serious performance problem. The algorithm is very simple, here is a plain translation: ...
vapor's user avatar
  • 7,921
6 votes
2 answers
757 views

Euler Project Problem 18

I use Mathematica to implement a function, which output the position path in the triangle required. And the elements are found to be {75, 95, 47, 87, 82, 75, 73, 28, 83, 47, 43, 73, 91, 67, 98}, which ...
Αλέξανδρος Ζεγγ's user avatar
7 votes
3 answers
230 views

Counting runs in bits, along with their starts and lengths, in functional style

Here is some code to visualize Project Euler Problem 502. The code scans for runs of bits in the binary representation of an integer, and outputs the beginning position of each run and the length of ...
Manuel --Moe-- G's user avatar
2 votes
0 answers
89 views

Why does this function recur forever? [closed]

I am trying to solve Project Euler Problem 31, but I don't want answers for that. I just want to know why this function recurs forever. It just keeps subtracting one forever, on the ones where it goes ...
Alexis Purslane's user avatar
2 votes
2 answers
395 views

How to Optimize Solution? (Project Euler #14) [duplicate]

Link to Question: https://projecteuler.net/problem=14 I began by defining the following functions below. ...
user155812's user avatar

15 30 50 per page