Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wiirios/project-euler
my solutions for Project Euler
https://github.com/wiirios/project-euler
challenge math mathematics
Last synced: about 1 month ago
JSON representation
my solutions for Project Euler
- Host: GitHub
- URL: https://github.com/wiirios/project-euler
- Owner: wiirios
- License: mit
- Created: 2024-08-05T13:41:44.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-04T18:37:50.000Z (3 months ago)
- Last Synced: 2024-11-13T18:45:24.115Z (about 2 months ago)
- Topics: challenge, math, mathematics
- Language: Mathematica
- Homepage: https://projecteuler.net/about
- Size: 214 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Project-Euler
Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.## Getting Started
### Installation
If you wanted to run Wolfram solutions, follow the instructions:## Method 1: Using `Wolfram|One`
1. Clone this repo
```
git clone https://github.com/Winnd11/Project-Euler.git
```Just open a solution you want to run.
## Method 2: Using `Wolfram Language Notebook Extension In VSCode`
1. Install the wolfram engine
2. Instal the Wolfram-Language-Notebook extension in VSCode
***NOTE: This extension is not official***
3. Open a solution and run it
## Method 3: Using `Wolfram Language For Jupyter`
1. Follow the steps in this repo
## Method 4: Using `Terminal`
You can run the solutions in the terminal itself, but for this you need to have the Wolfram engine installed.
1. Run this command in terminal
```
wolframscript
```The first time you will need to enter your email and password
After that, if everything goes well, this will appear
```
Wolfram Language 14.1.0 Engine for Microsoft Windows (64-bit)
Copyright 1988-2024 Wolfram Research, Inc.
```After that you can copy the solution code and run it in the terminal
```
In[1]:= Total[DeleteDuplicates[Join[Times[3, Range[333]], Times[5, Range[199]]]]]Out[1]= 233168
```Or you can open the code directly from the terminal
```
wolframscript -file problem_1.wl233168
```***NOTE: Use Print to produce an output from code in a file. The value of the last expression in a file is not returned by default, as in the notebook interface.***
Example:
```mathematica
(* Original problem_1.wl *)
(* will return a empty value *)
Total[DeleteDuplicates[Join[Times[3, Range[333]], Times[5, Range[199]]]]](* After correcting *)
Print[Total[DeleteDuplicates[Join[Times[3, Range[333]], Times[5, Range[199]]]]]]
```***For more information see the oficial website***
### Solutions
| Title | Mathematica |
| ------------- | ------------- |
| Multiples of 3 or 5 | P01 |
| Largest Prime Factor | P03 |
| Largest Palindrome Product | P04 |
| Smallest Multiple | P05 |
| Sum Square Difference | P06 |
| 10001st Prime | P07 |
| Largest Product in a Series | P08 |
| Special Pythagorean Triplet | P09 |
| Summation of Primes | P10 |
| Highly Divisible Triangular Number | P12 |
| Large Sum | P13 |
| Longest Collatz Sequence | P14 |
| Lattice Paths | P15 |
| Power Digit Sum | P16 |
| Counting Sundays | P19 |
| Factorial Digit Sum | P20 |
| Amicable Numbers | P21 |
| 1000-digit Fibonacci Number | P25 |## MIT License
This project is licensed under MIT license, read more at docs.github