When Madin learnt about factorials, he was delighted that they had so many factors since k ! = 1 × 2 × 3 × … × k . He knew that k ! would be divisible by any positive integer that was smaller than k , but wasn't certain about the larger integers.
Can you find the number of integers n such that 2 ≤ n ≤ 1 0 0 and ( n − 1 ) ! is not divisible by n 2 ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
To show that other numbers are not possible: show that composite numbers k of form k = m ∗ n , where m , n are coprime have k 2 ∣ ( k − 1 ) ! [Show that m 2 , n 2 both divide ( k − 1 ) ! ], while prime powers greater than 8 , 9 fulfil the same conditions too. (For higher powers of 2 , 3 you can do as shown above, higher primes can be shown in an analogous way as m ∗ n above)
In general, the integers n where n 2 ∤ ( n − 1 ) ! are where n is one of the following: a prime, double a prime or 8 , 9
Can somebody help me find solutions to this question?
Anagram Cracker!!
Anagrams are problems related to shuffled letters which are needed to be arranged and made into perfect meaningful sentences without repeating the letters (letters can be used only once).
Here are some anagrams which you need to crack:
1) tuteauaewribeifslh
2) geaperioitrdspawsagnhabineod
3) enaednenetorfyimrw
Remember to arrange and make a meaningful sentence (one sentence from each group of letters), not single word. If you are able to solve this anagrams please inform me the answers as well as how you found the solutions to the anagrams.
Details and assumptions:
Example:
"My name is Anil" can be written in the form of group of letters as:
meailaysmnni
Given an integer n , let α : = v p ( n ) be the number of factors of a prime p in n . Then v p ( n 2 ) = 2 α . We want to calculate v p ( ( n − 1 ) ! ) and in order to do this we use the Legendre-De Polignac identity and we get v p ( ( n − 1 ) ! ) = i ≥ 1 ∑ ⌊ p i n − 1 ⌋ but we have the trivial inequality n ≥ p α , so v p ( ( n − 1 ) ! ) ≥ i ≥ 1 ∑ ⌊ p i p α − 1 ⌋ = i = 1 ∑ α − 1 p α − i − 1 . We can transform the last sum into p − 1 p α − 1 − α by the formula for the sum of a geomteric progression. The numbers that satisfy the statement in the text are those for which v p ( n 2 ) > v p ( ( n − 1 ) ! ) , which is 2 α > p − 1 p α − 1 − α , ie 3 α > p − 1 p α − 1 If α = 1 this inequality holds for every prime. Then if n is a prime, it satisfies the problem; if n = k p with k not divisible by p, then n 2 has 2 factors p, while ( n − 1 ) ! has at least k-1 factors p; so the condition of the problem is satisfied if and only if k is 2 (or 1).
If α = 2 then p can be only 2 or 3 and it is easily checked that 4 and 9 are ok, while 4k and 9k aren't ok if k ≥ 2
If α = 3 then p can be only 2, and we see that 8 is ok, while 8k isn't.
If α ≥ 4 then there are no solutions. So, the only values for n are p, 2p, 4, 8, 9; the primes under 100 are 25, the primes such that 2 p ≤ 1 0 0 are 15. So there are 2 5 + 1 5 + 2 = 4 2 values for n that satisfy the problem (4 is already counted as 2p).
Why aren't there any solutions for α ≥ 4 ?
Log in to reply
You easily see that because on the right you have an exponential formula (increasing wrt α and wrt p) while on the left you have a linear expression. So for fixed α the minimum of the rhs is at p = 2 ; but for α = 4 the inequality is false, and so it is for every other bigger α (since the rhs is increasing in α )
What's Legendre-De Polignac identity ?
Hi, I am beginner in python
I try to solve this problem use python
thisi is my code
import math
for n in range (2,101):
if math.factorial(n-1)%n**2==0:
print n
Output:
12 15 16 18 20 21 24 25 27 28 30 32 33 35 36 39 40 42 44 45 48 49 50 51 52 54 55 56 57 60 63 64 65 66 68 69 70 72 75 76 77 78 80 81 84 85 87 88 90 91 92 93 95 96 98 99 100
But, I can't count direct the answer, and I count one by one.
Can you help me, guy?s??
You are counting the #s that don't satisfy the property said in the problem.
You can use a counter; first write the line count=0, and have it count up 1 every time the condition is satisfied. Your final program might look something like this. (Hopefully, 42 will be printed, but you can check yourself)
import math
count=0
for x in range(2, 101):
if math.factorial(x-1)%(x**2)!=0:
count+=1
print count
Log in to reply
Thank you very much... I am interested for learning programming. So, I try to solve this problem not number theory concept, I am sorry.
Log in to reply
Go to Project Euler for questions based on math + programming
Can somebody help me find solutions to this question?
Anagram Cracker!!
Anagrams are problems related to shuffled letters which are needed to be arranged and made into perfect meaningful sentences without repeating the letters (letters can be used only once).
Here are some anagrams which you need to crack:
1) tuteauaewribeifslh
2) geaperioitrdspawsagnhabineod
3) enaednenetorfyimrw
Remember to arrange and make a meaningful sentence (one sentence from each group of letters), not single word. If you are able to solve this anagrams please inform me the answers as well as how you found the solutions to the anagrams.
Details and assumptions:
Example:
"My name is Anil" can be written in the form of group of letters as:
meailaysmnni
Well!. This is a oldProblem. Was also asked in INMO. See here, INMO
Clearly if n is prime then the condition is met, however if n = 2 p for some prime p then the condition is also met because there is only one multiple of p in ( 2 p − 1 ) ! thus 4 p 2 will never divide ( 2 p − 1 ) !
Now suppose either n = p k for some prime p and some non-negative integer k > 2 . Clearly since there are at least two multiples of p in ( 2 p − 1 ) ! then k 2 p 2 must be able to divide ( 2 p − 1 ) ! . Same argument can be made k -centric.
Thusly no composite number is eligible and so either n is prime or the double of a prime for 2 ≤ n ≤ 1 0 0 which means there are 4 2 values of n for which n 2 does not divide ( n − 1 ) !
What about n = 8? n = 9?
Log in to reply
What about them? Neither work.
I am very sorry, they do work I made a huge error when I was checking them sorry
... and so either is prime or the double of a prime for ...
If that were true, there would only be 25+15=40 values for n. Cf Michael Tang's comment.
Log in to reply
Evidently I had counted the pairs wrong, I'm sorry I will work on fixing this solution and add the extension as a comment as soon as I have it. Sorry for the inconvenience
EDIT: another case was missed in the solution there was an error made whilst counting the primes.
If n = p a for some prime p and some positive integer a ≥ 2 then there arise two more solutions. If a = 2 then there are p − 1 values of p in ( p a − 1 ) ! so if we had 4 > p − 1 then we would have a value of n such that the requirements are met.
p − 1 = 1 ⇒ p = 2 , so n = 4 which has already been counted
p − 1 = 2 ⇒ p = 3 , so n = 9
p − 1 = 3 ⇒ p = 4 but 4 isn't prime hence there is a contradiction and p − 1 = 3 is ignored.
Now consider a = 3 This means there are p 2 − 1 number of p in ( p 3 − 1 ) ! and so if we had 6 > p 2 − 1 then we'd have a value of n that satisfies the conditions.
p 2 − 1 must be an integer and thus can only be 3
p 2 − 1 = 3 ⇒ p = 2 , ∵ p > 0 ⇒ n = 8
Now consider a ≥ 4 There will be p a − 1 − 1 number of p in ( p a − 1 ) ! We require 2 a > p a − 1 − 1 however if a > 5 then p a − 1 − 1 > 2 a and if a = 4 then only for p = 2 is 2 a > p a − 1 − 1
However, p = 2 ⇒ n = 2 4 = 1 6 which does not in fact work. Thus the extra solutions are n = 8 , 9 which brings the total up to 4 2
Problem Loading...
Note Loading...
Set Loading...
When we first see divisibility questions like this (especially with factorials), one idea to approach the question could be using primes. This is because for a factorial n ! , if prime p > n , then p ∤ n ! as there are no prime factors p in n ! . (This is one case of our question too!)
So, firstly, as many other number theory questions, let's think of cases to split our solution into: (the bold sentence/phrase indicates the Case)
Case 1 A similar idea as mentioned above: Let n be a prime. We know n > n − 1 , hence it follows that n 2 ∤ ( n − 1 ) ! . Keeping in mind the condition of 2 ≤ n ≤ 1 0 0 . There are 2 5 primes less than 1 0 0 .
Case 2 * Let n = 2 × p where p is a prime *. Then, observe that there will only be 1 factor of p in ( n − 1 ) ! since n − 1 < n = 2 p . Thus, n 2 = 2 2 × p 2 ∤ ( n − 1 ) ! . There are 1 5 primes such that 2 ≤ n = 2 p ≤ 1 0 0 .
Case 3 There are 2 exceptions that satisfy the condition of the question but do not belong to either Case 1 or 2. They are n = 8 , 9 , thus 2 solutions in Case 3. When n = 8 = 2 3 , ( n − 1 ) ! = 7 ! has ⌊ 2 7 ⌋ + ⌊ 4 7 ⌋ = 3 factors of 2 , hence, n 2 = 8 2 = 2 6 ∤ 7 ! . Similarly, for the solution n = 9 = 3 2 , ( n − 1 ) ! = 8 ! has only ⌊ 3 8 ⌋ = 2 factors of 3 . Hence, n 2 = 9 2 = 3 4 ∤ 8 !
(I tested out the first 1 0 values of n and observed the exceptions. So, how do I know that there are only 2 exceptions? Well, testing the next powers of 2 and 3 which are n = 2 4 = 1 6 and n = 3 3 = 2 7 respectively, will show that they do not satisfy the conditions.)
Hence, the number of integers n satisfying all conditions in the question
= 2 5 + 1 5 + 2 = 4 2 .