Write a function count-div
: number(k) number(n) -> number that gives
1 if k divides n and 0 otherwise.
count-divisors
: positive-integer(n) -> positive-integer. Count how
many integers 1,2,…,n divide the number n
.
smallest-factor
: positive-integer(n) -> positive-integer. Find the smallest divisor of n
that is greater than 1.
is-prime?
: positive-integer(n) -> boolean. True if n
is prime,
false otherwise.
smallest-prime-factor
: positive-integer(n) -> positive-integer. Find the smallest prime factor of n
.
group-3
: string(word) -> string. Insert spaces after every three letters of word
. Example: (group-3 "pancake") => "pan cak e"
.