# d2de8990952f

`Problem 29`
author Steve Losh Wed, 22 Feb 2017 18:08:30 +0000 81710e614e21 793042f215fb (none) src/euler.lisp

## Changes

```--- a/src/euler.lisp	Wed Feb 22 18:01:30 2017 +0000
+++ b/src/euler.lisp	Wed Feb 22 18:08:30 2017 +0000
@@ -825,6 +825,25 @@
;; don't double-count the center...
(- (aref spiral (truncate size 2) (truncate size 2))))))

+(defun problem-29 ()
+  ;; Consider all integer combinations of a^b for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:
+  ;;
+  ;; 2²=4,  2³=8,   2⁴=16,  2⁵=32
+  ;; 3²=9,  3³=27,  3⁴=81,  3⁵=243
+  ;; 4²=16, 4³=64,  4⁴=256, 4⁵=1024
+  ;; 5²=25, 5³=125, 5⁴=625, 5⁵=3125
+  ;;
+  ;; If they are then placed in numerical order, with any repeats removed, we
+  ;; get the following sequence of 15 distinct terms:
+  ;;
+  ;; 4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125
+  ;;
+  ;; How many distinct terms are in the sequence generated by a^b for
+  ;; 2 ≤ a ≤ 100 and 2 ≤ b ≤ 100?
+  (length (iterate (for-nested ((a :from 2 :to 100)
+                                (b :from 2 :to 100)))