jasser

60 Reputation

3 Badges

1 years, 83 days

MaplePrimes Activity


These are questions asked by jasser

Hello

I would like to replace the expression

"floor(root(n,3))"

by another, more efficient one. Maybe something with iroot?

n is a positive integer.

Thanks for an answer.

Hi

I want to count in a list L with many sublists the number of sublists, that contain m elements and only primes. How can I do that?

Example:

L:=[[2,3,5,7],[7,13,29],[2,3,4],[5,31,53]], m=3

The result should be 2, because only [7,13,29] and [5,31,53] satiesfy both criteria.

Thank you for an answer!

Hi

I am looking for a more efficient way to find all Divisors of n that are smaller than m as

Divisors(n) intersect {seq(i),i=1..m}

For example: For n=24 and m=7 it should result {1.2.3.4.6}.

Thanks for your help!

Hello

I would like to calculate the number of partitions of a number s with length n, where the maximum value in the partitions is also n.

For example: s=10, n=4

The result should be 5, because there are 5 partions with length 4 and maximum value 4:

4411, 4321, 4222, 3331, 3322

If I use "PartitionFixedSize(10,'parts'=4)", it makes also partitions with values > 4, for example 5311. How to limit this?

Thank you for an answer!

Kind regards

 

 

Hello

I am looking for an efficient code to divide a given integer n by another integer d as many times as possible.

For example:

For n=294912 and d=8 the answer shoud be 9, because 294912/8^5=9.

Thank you for your help.

1 2 3 Page 1 of 3