9
votes
4answers
1k views

Semi prime numbers

The high school textbook I am using has the example of semi-prime numbers. They wanted students to find (by "perspiration") all the semi-prime numbers less than $50$ (for a question on set theory). ...
7
votes
4answers
248 views

Generate PrimePower counting function

Is there a way to generate a counting function for prime powers - i.e. to create a similar function to PrimePi, but including prime powers. The following will, of ...
1
vote
3answers
181 views

Generating a list of cubefree numbers

I am trying to generate a list of cubefree numbers (i.e. numbers when prime factorized contain no tripled factors) within a given range. Of DivisorSigma, ...
3
votes
1answer
146 views

Generating a list of all factorizations

What is the best way to generate a list of all factorizations of some number $n$? I'm quite new to Mathematica so this might be obvious. I have been trying some basic stuff with ...
6
votes
1answer
119 views

Implementing Remainder Tree

I want to implement Remainder Tree based on this. With the answers on SE I've come up with: ...
2
votes
3answers
364 views

Generating pairs of additive and multiplicative factors for integers

Given an integer $n$, I want to get two lists: a) the set of pairs of the divsors $a,b$ into exactly two factors $n=a\cdot b$, b) the set of pairs $a,b$ of two summands $n=a+b$. The code I ...
20
votes
6answers
1k views

efficient way to count the number of zeros at the (right) end of a very large number

If I want to count the number of zeros at the (right) end of a large number, like $12345!$, I can use something like: Length[Last[Split[IntegerDigits[12345!]]]] ...