# Mega Man Zero 3

Euler problem 1

. (proclaim '(optimize speed))

(reduce #'+ '(1 2 3 4))

; 10

(loop :for n :below 10 :collect n)

; (0 1 2 3 4 5 6 7 8 9)

(describe :below)

(defun range (max &key (min 0) (step 1))
(loop :for n :from min :below max :by step
collect n))

(- (+ (* 3 (reduce #'+ (range 334 :min 1 :step 1)))
(* 5 (reduce #'+ (range 200 :min 1 :step 1))))
(* 15 (reduce #'+ (range 67 :min 1 :step 1))))

; 233168

(defun sum-1-n (n)
(/ (* n (+ n 1)) 2))

(- (+ (* 3 (sum-1-n 333))
(* 5 (sum-1-n 199)))
(* 15 (sum-1-n 66)))

; 233168 — Me@2022-08-01 03:29:01 PM

.

.

# Jupyter Notebook

SICMUtils, 3

.

The goal of this post to setup Jupyter Notebook.

.

1. Read and follow the exact steps of my post titled “SICMUtils“.

.

2. To install the Jupyter Notebook software in Ubuntu, use this command:

sudo apt-get install sagemath-jupyter


3. Try to open the SageMath program.

4. It will open a Jupyter notebook page.

5. Click the “New” button at the top right corner and then select “SageMath“.

.

6. Type

1 + 1


onto the input line.

7. Hit the keys shift-enter to get the output

2


.

8. Input

Integrate(x^3, x)


9. Hit shift-enter:

NameError: name 'Integrate' is not defined


.

10. Input

from sage.symbolic.integration.integral import *

indefinite_integral(x^3, x)


11. Hit shift-enter:

1/4*x^4


.

12. Input

%display latex


13. Hit shift-enter.

.

14. Input

indefinite_integral(x^3, x)


15. Hit shift-enter: $\displaystyle{\frac{1}{4} \, x^{4}}$

— Me@2022-07-30 12:18:50 PM

.

.