Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,19 @@
func jacobsthal(n) {
lucasU(1, -2, n)
}
func lucas_jacobsthal(n) {
lucasV(1, -2, n)
}
say "First 30 Jacobsthal numbers:"
say 30.of(jacobsthal)
say "\nFirst 30 Jacobsthal-Lucas numbers:"
say 30.of(lucas_jacobsthal)
say "\nFirst 20 Jacobsthal oblong numbers:"
say 21.of(jacobsthal).cons(2, {|a,b| a * b })
say "\nFirst 20 Jacobsthal primes:";
say (1..Inf -> lazy.map(jacobsthal).grep{.is_prime}.first(20))