Book recommendations to start learning programming for project Euler

Click For Summary

Discussion Overview

The discussion revolves around recommendations for books and resources to learn programming, specifically aimed at solving problems from Project Euler. Participants express varying levels of familiarity with programming and number theory, and explore different programming languages and tools suitable for this purpose.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant seeks book recommendations for learning programming to tackle Project Euler problems, noting their background in number theory but limited programming experience.
  • Another participant recommends a free e-book titled "Introduction to Scientific Programming with Python" and suggests using SageMath for number theory applications.
  • Some participants express interest in SageMath and its potential usefulness for solving Project Euler problems, while others question its effectiveness compared to traditional programming approaches.
  • One participant emphasizes the importance of gaining experience in efficiently reducing solution spaces rather than relying solely on mathematical packages like Mathematica.
  • There are suggestions to use online resources such as Programiz for Python programming consolidation, as well as offers to share additional Sage resources.
  • A participant expresses a desire to start solving Project Euler problems sequentially, viewing it as a way to practice number theory and learn programming simultaneously.

Areas of Agreement / Disagreement

There is no consensus on the best approach or resources for learning programming in relation to Project Euler. Participants present multiple competing views on the usefulness of different programming languages and tools, particularly SageMath versus traditional programming methods.

Contextual Notes

Participants express varying levels of familiarity with programming languages and tools, and there are unresolved questions regarding the effectiveness of SageMath in solving Project Euler problems compared to other programming environments.

MidgetDwarf
Messages
1,606
Reaction score
716
I do not know much about programming. I have used Mathematica, and some Python in the past for very specific problems.
Any book recommendations for one wanting to learn programming in order to solve problems from Project Euler. I am familiar with number theory, but not with programming.
 
Physics news on Phys.org
I share this with my students, its a free e book from springer
"Introduction to Scientific Programming with Python"
https://link.springer.com/book/10.1007/978-3-030-50356-7

For simpler projects I recommend them to use https://codewith.mu/

This might be of interest for you
https://www.sagemath.org/
Just google "number theory with sage" "abstract algebra with sage" etc and you'll find tons of material like these
 
  • Like
  • Informative
Likes   Reactions: vanhees71, berkeman and MidgetDwarf
malawi_glenn said:
I share this with my students, its a free e book from springer
"Introduction to Scientific Programming with Python"
https://link.springer.com/book/10.1007/978-3-030-50356-7

For simpler projects I recommend them to use https://codewith.mu/

This might be of interest for you
https://www.sagemath.org/
Just google "number theory with sage" "abstract algebra with sage" etc and you'll find tons of material like these
Thanks for the great links. I was unaware of the existence of Sage.
I ordered a physical copy of the Springer book.
 
  • Like
Likes   Reactions: vanhees71 and malawi_glenn
I have some more Sage stuff if you are interested and want to go down that route
 
  • Like
Likes   Reactions: vanhees71
  • Like
Likes   Reactions: malawi_glenn and vanhees71
malawi_glenn said:
I have some more Sage stuff if you are interested and want to go down that route
Do you think Sage would be useful for solving Project Euler problems?
 
MidgetDwarf said:
I do not know much about programming. I have used Mathematica, and some Python in the past for very specific problems.
Any book recommendations for one wanting to learn programming in order to solve problems from Project Euler. I am familiar with number theory, but not with programming.
Can you list a few of the problems from Project Euler that you are interested in working on? That would help us in our recommendations, I think. Thanks.
 
pbuk said:
Do you think Sage would be useful for solving Project Euler problems?
Rethorical question?
 
malawi_glenn said:
Rethorical question?
Not at all. As I understand it, the aim of SageMath is to create an open source alternative to declarative math packages such as Matlab and Mathematica. If you look at the "leader board" for Project Euler there is only one entry for an Eulerian who declares that they use Mathematica.

Whilst some of the early problems can easily be solved using e.g. Mathematica in reasonable time e.g. https://projecteuler.net/problem=1, this leaves the "heavy lifting" to the package and does not give you the experience of efficiently reducing the size of the solution space that is necessary in solving many of the later problems.
 
  • #10
pbuk said:
"heavy lifting" to the package and does not give you the experience of efficiently reducing the size of the solution space that is necessary in solving many of the later problems.
Just because there are packages does not mean one has to use them. One could also use the packages to check the solution. I mean if you do not want to use the inbuilt "mod" function, just write your own :-)

EDIT: I guess GNU octave is still "good" these days. It is basically a free version of MATLAB
 
Last edited:
  • #11
Yes please, share more Sage stuff.

As for what problems I want to solve in Project Euler. I want to start from 1 going upwards. I see it more as practicing the number theory I know, and learning more, while learning a bit of python, or what ever language, in the process.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
40
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
2K
Replies
7
Views
3K
Replies
4
Views
3K
  • · Replies 29 ·
Replies
29
Views
2K