From 4e2d62b030546c9c04c8b9f355adff3cc0182d09 Mon Sep 17 00:00:00 2001 From: Walt Mankowski Date: Fri, 15 Jul 2022 21:17:16 -0400 Subject: fixed link syntax --- challenge-173/walt-mankowski/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenge-173/walt-mankowski/README.md b/challenge-173/walt-mankowski/README.md index 7a5af58509..b9e53c1a92 100644 --- a/challenge-173/walt-mankowski/README.md +++ b/challenge-173/walt-mankowski/README.md @@ -20,7 +20,7 @@ sub is_esthetic($n) { ## Task 2: Sylvester's Sequence -For this task we need to generate the first 10 terms of (Sylvester's Sequence)[https://en.wikipedia.org/wiki/Sylvester%27s_sequence]. **Sylvester's Sequence** is an integer sequence where every term is the product of all the previous terms, plus one. +For this task we need to generate the first 10 terms of [Sylvester's Sequence](https://en.wikipedia.org/wiki/Sylvester%27s_sequence). **Sylvester's Sequence** is an integer sequence where every term is the product of all the previous terms, plus one. Terms in Sylvester's Sequence get very large very fast (the 10th term has 20 digits) so we need to use the `bigint` module. I also used the `prod` function from `List::Util` to do the multiplication. With those modules in hand, we can solve this challenge in just a few lines of code: @@ -31,4 +31,4 @@ use List::Util qw(product); my @sylvester; push @sylvester, 1 + product @sylvester while @sylvester < 10; say for @sylvester; -``` \ No newline at end of file +``` -- cgit