Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Home-primes/Transd/home-primes.transd
Normal file
23
Task/Home-primes/Transd/home-primes.transd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#lang transd
|
||||
|
||||
MainModule: {
|
||||
homePrime: (λ i BigLong()
|
||||
(if (is-prime i) (lout "HP" i " = " i) continue)
|
||||
(with n BigLong(i) ch Vector<BigLong>() st 1
|
||||
(append ch n)
|
||||
(while true
|
||||
(= n (join (prime-factors n) ""))
|
||||
(append ch n)
|
||||
(if (is-probable-prime n 15)
|
||||
(for l in Range(in: ch 0 -1) do
|
||||
(textout "HP" l "("(- (size ch) @idx 1) ") = "))
|
||||
(lout (back ch)) (ret)
|
||||
else (+= st 1))
|
||||
)
|
||||
)
|
||||
),
|
||||
_start: (λ
|
||||
(for i in Range(2 21) do (homePrime BigLong(i)))
|
||||
(homePrime BigLong(65))
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue