Prime Generating Function

Find the smallest positive integer n n for which the function f ( n ) = n 2 + n + 41 f(n)=n^2+n+41 is composite.


The answer is 40.

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.

2 solutions

Chew-Seong Cheong
May 18, 2015

Since 41 41 is a prime, for f ( n ) = n 2 + n + 41 f(n) = n^2+n+41 to be a composite, n 2 + n = n ( n + 1 ) n^2 + n = n(n+1) must be divisible by 41 41 . As 41 41 is a prime, it cannot be a multiple of any n < 41 n<41 , therefore, n ( n + 1 ) n(n+1) is not a multiple of 41 41 for n < 40 n<40 . Therefore, the smallest n n that satisfies the condition is n = 40 n = \boxed{40} .

Moderator note:

Not quite right. You have only shown that n = 40 n=40 is possible, you didn't show that it is a minimum value.

In response to the Challenge Master: Proving that n = 40 n = 40 is the least integer is surprisingly difficult, as demonstrated here . It would probably be easier to just brute force our way through the numbers 1 1 to 39. 39. :)

Brian Charlesworth - 6 years ago

Why does 41 being prime imply that n^2+n must be divisible by 41 for n^2+n+41=f(n) to be composite? This is only true if we specify that f(n) is divisible by 41. For example, 3 is prime and 5 is not divisible by 3, but 5+3 is composite.

Maggie Miller - 5 years, 11 months ago

Log in to reply

Because 41 41 is a prime and n n an integer, we have no way of factorize f ( n ) = n 2 + n + 41 f(n) = n^2 + n + 41 . For your example, you cannot get n 2 + n = 5 n^2+n = 5 or 3 3 . For example, n 2 + n + 3 n m i n = 2 n^2+n+3\quad \Rightarrow n_{min} = 2 and n 2 + n + 5 n m i n = 4 n^2+n+5\quad \Rightarrow n_{min} = 4 . This actually generalizes it. f ( n ) = n 2 + n + p n m i n = p 1 f(n) = n^2 + n + p \quad \Rightarrow n_{min} = p-1 .

Chew-Seong Cheong - 5 years, 11 months ago

I don't see anything wrong. Since 41 41 is a prime and n n is an integer, we cannot factorize f ( n ) = n 2 + n + 41 f(n)=n^2+n+41 . So f ( n ) f(n) is a composite if and only if n ( n + 1 ) n(n+1) is divisible by 41 41 . It is impossible to have an n < 41 n<41 which divides 41 41 because 41 41 is a prime. Therefore ( n + 1 ) = 41 (n+1)=41 must be smallest divisor of 41 41 for n < 41 n<41 and n = 40 n=40 .

Chew-Seong Cheong - 5 years, 11 months ago

This result was founded by Euclid that in n 2 + n + 41 n^2 + n + 41 is prime from n = 0 to 39. So minimum is 40.

Dev Sharma - 5 years, 9 months ago

Let's see what happens with small prime numbers: for n 2 + n + 2 n^2+n+2 we have n = 1 n=1 , for n 2 + n + 3 n^2+n+3 we have n = 2 n=2 , for n 2 + n + 5 n^2+n+5 we have n = 4 n=4 , for n 2 + n + 7 n^2+n+7 we have n = 6 n=6 , etc. It seems to be 40 40 . Let's check this potential solution: f ( 40 ) = 1681 = 4 1 2 f(40)=1681=41^2 , then it is composite. But now we should show that it is the minimum value or just brute force through the numbers.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...