## 55 Reputation

0 years, 308 days

## efficient code for number of divides...

Maple

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.

## List from txt-file...

Maple

Hi

I would like to create/import a list from a text-file. The text-file "example.txt" has the following structur:

1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 12
11 14

On every line are two numbers, separated by a space. The list should contain only the second number, in this example

L:=[1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14].

The original text-file has 12615 lines, the biggest number is around  3.126 * 10^139.

## Period of a decimal number ...

Maple

Hello

Beginning with a given real fraction, for example 1/12, I would like to find out the following information about its decimal number (here: 0.0833333...):

- decimal number up to period, here 0.08

- the period if exists, here 3

How to program that in Maple?

Thanks a lot for your help!

How

## order of elements in lists...

Maple

Hello

I have a list N with i elements, for example N:=[7,2,4] with i = 3. From another list L I know, that all the elements of N are also elements of L, but I don't know if they are in the same order. For example:

In L1=[2,6,5,7,3,2,9,4] the elements are in the same order, but they are not in L1=[2,1,4,2,6,7,3,9].

How to write a program that can say wether the elements are in the correct order or not?

## Compare the digits of two numbers...

Maple 2023

Hello

I would like to compare the digits of two natural numbers p and q first. Then I would like to omit in p and q the digits which they have in common.

Example: p=2345, q=1536

the common digits are 3 and 5. omitted them in both numbers, it will result p'=24 and q'=16.