aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2022-06-25 19:33:52 +0100
committerGitHub <noreply@github.com>2022-06-25 19:33:52 +0100
commit5d67716f642399d64fb11b2756225947de43384f (patch)
tree54491d6b28c7cb12fb4e65b5e91972261846f3a8
parent1f924ef4e04df43125bbce94275506fe0f270602 (diff)
parent1acb2f952d8216b370fd868adece6b7614f7ba96 (diff)
downloadperlweeklychallenge-club-5d67716f642399d64fb11b2756225947de43384f.tar.gz
perlweeklychallenge-club-5d67716f642399d64fb11b2756225947de43384f.tar.bz2
perlweeklychallenge-club-5d67716f642399d64fb11b2756225947de43384f.zip
Merge pull request #6332 from drbaggy/master
Primorial -> Achilles
-rw-r--r--challenge-169/james-smith/README.md26
-rw-r--r--challenge-170/james-smith/README.md15
2 files changed, 41 insertions, 0 deletions
diff --git a/challenge-169/james-smith/README.md b/challenge-169/james-smith/README.md
index fb95af0dfc..761ed04166 100644
--- a/challenge-169/james-smith/README.md
+++ b/challenge-169/james-smith/README.md
@@ -237,6 +237,31 @@ Some examples for larger values of `n` are:
| 325,000 | 81,981,196,443 | 3<sup>3</sup>.55103<sup>2</sup> |
| 350,000 | 94,917,245,000 | 2<sup>3</sup>.5<sup>4</sup>.4357<sup>2</sup> |
| 375,000 | 108,802,180,800 | 2<sup>6</sup>.3<sup>5</sup>.5<sup>2</sup>.23<sup>4</sup> |
+| 400,000 | 123,623,945,500 | 2<sup>2</sup>.5<sup>3</sup>.11<sup>3</sup>.431<sup>2</sup> |
+| 425,000 | 139,380,371,325 | 3<sup>6</sup>.5<sup>2</sup>.13<sup>3</sup>.59<sup>2</sup> |
+| 450,000 | 156,087,946,125 | 3<sup>2</sup>.5<sup>3</sup>.11779<sup>2</sup> |
+| 475,000 | 173,733,903,648 | 2<sup>5</sup>.3<sup>6</sup>.2729<sup>2</sup> |
+| 500,000 | 192,302,155,612 | 2<sup>2</sup>.7<sup>3</sup>.11839<sup>2</sup> |
+| 525,000 | 211,812,977,475 | 3<sup>2</sup>.5<sup>2</sup>.11<sup>3</sup>.29<sup>4</sup> |
+| 550,000 | 232,275,648,200 | 2<sup>3</sup>.5<sup>2</sup>.53<sup>2</sup>.643<sup>2</sup> |
+| 575,000 | 253,653,177,148 | 2<sup>2</sup>.7<sup>3</sup>.13597<sup>2</sup> |
+| 600,000 | 275,972,670,000 | 2<sup>4</sup>.3<sup>5</sup>.5<sup>4</sup>.337<sup>2</sup> |
+| 625,000 | 299,230,934,400 | 2<sup>7</sup>.3<sup>3</sup>.5<sup>2</sup>.1861<sup>2</sup> |
+| 650,000 | 323,432,005,175 | 5<sup>2</sup>.47<sup>3</sup>.353<sup>2</sup> |
+| 675,000 | 348,549,042,888 | 2<sup>3</sup>.3<sup>2</sup>.41<sup>2</sup>.1697<sup>2</sup> |
+| 700,000 | 374,611,070,700 | 2<sup>2</sup>.3<sup>3</sup>.5<sup>2</sup>.11779<sup>2</sup> |
+| 725,000 | 401,600,467,125 | 3<sup>3</sup>.5<sup>3</sup>.11<sup>3</sup>.13<sup>2</sup>.23<sup>2</sup> |
+| 750,000 | 429,542,144,712 | 2<sup>3</sup>.3<sup>2</sup>.77239<sup>2</sup> |
+| 775,000 | 458,391,256,875 | 3<sup>2</sup>.5<sup>4</sup>.19<sup>3</sup>.109<sup>2</sup> |
+| 800,000 | 488,186,710,964 | 2<sup>2</sup>.29<sup>3</sup>.2237<sup>2</sup> |
+| 825,000 | 518,923,743,752 | 2<sup>3</sup>.257<sup>2</sup>.991<sup>2</sup> |
+| 850,000 | 550,582,402,248 | 2<sup>3</sup>.3<sup>4</sup>.103<sup>2</sup>.283<sup>2</sup> |
+| 875,000 | 583,157,667,200 | 2<sup>7</sup>.5<sup>2</sup>.19<sup>3</sup>.163<sup>2</sup> |
+| 900,000 | 616,689,640,125 | 3<sup>2</sup>.5<sup>3</sup>.13<sup>2</sup>.1801<sup>2</sup> |
+| 925,000 | 651,153,828,125 | 5<sup>7</sup>.2887<sup>2</sup> |
+| 950,000 | 686,540,147,825 | 5<sup>2</sup>.7<sup>3</sup>.431<sup>3</sup> |
+| 975,000 | 722,830,618,800 | 2<sup>4</sup>.3<sup>11</sup>.5<sup>2</sup>.101<sup>2</sup> |
+| 1,000,000 | 760,089,707,712 | 2<sup>6</sup>.3<sup>5</sup>.6991<sup>2</sup> |
And these are the first numbers with `n` digits...
@@ -253,6 +278,7 @@ And these are the first numbers with `n` digits...
| 10 | 34,562 | 1,000,042,200 | 2<sup>3</sup>.3<sup>6</sup>.5<sup>2</sup>.19<sup>3</sup> |
| 11 | 111,892 | 10,000,373,888 | 2<sup>7</sup>.8839<sup>2</sup> |
| 12 | 359,341 | 100,001,075,328 | 2<sup>7</sup>.3<sup>2</sup>.7<sup>2</sup>.11<sup>6</sup> |
+| 13 | 1,148,196 | 1,000,002,788,575 | 5<sup>2</sup>.7<sup>3</sup>.10799<sup>2</sup> |
### Github formatting script....
diff --git a/challenge-170/james-smith/README.md b/challenge-170/james-smith/README.md
index 629ef1711c..b88b247b6e 100644
--- a/challenge-170/james-smith/README.md
+++ b/challenge-170/james-smith/README.md
@@ -45,6 +45,21 @@ say$a=1;forprimes{say$a*=$_}nth_prime 9 # 39 bytes
say$a=1;forprimes{say$a*=$_}23 # 30 bytes
```
+### Aside - Last week's challenge - Achilles numbers.
+
+There is a connection with last weeks challenge here. The lowest Achilles number with `n` distinct prime factors is `2 * P(n)^2`
+
+So we have:
+
+| n | P(n) | 2 * P(n)^2 | achilles idx | Factorisation |
+| -: | -------: | --------------: | -----------: | ------------- |
+| 2 | 6 | 72 | 1 | 2<sup>3</sup>.3<sup>2</sup> |
+| 3 | 30 | 1,800 | 20 | 2<sup>3</sup>.3<sup>2</sup>.5<sup>2</sup> |
+| 4 | 210 | 88,200 | 237 | 2<sup>3</sup>.3<sup>2</sup>.5<sup>2</sup>.7<sup>2</sup> |
+| 5 | 2,310 | 10,672,200 | 3,268 | 2<sup>3</sup>.3<sup>2</sup>.5<sup>2</sup>.7<sup>2</sup>.11<sup>2</sup> |
+| 6 | 30,030 | 1,803,601,800 | 46,747 | 2<sup>3</sup>.3<sup>2</sup>.5<sup>2</sup>.7<sup>2</sup>.11<sup>2</sup>.13<sup>2</sup> |
+| 7 | 510,510 | 521,240,920,200 | 826,862 | 2<sup>3</sup>.3<sup>2</sup>.5<sup>2</sup>.7<sup>2</sup>.11<sup>2</sup>.13<sup>2</sup>.17<sup>2</sup> |
+
# Challenge 2 - Kronecker Product
***Write a script to implement Kronecker Product on the given 2 matrices. e.g.***