Expressing Integers As A Difference Of Squares

Let f ( n ) f(n) be defined as the number of ways a positive integer n n can be expressed as a 2 b 2 a^2-b^2 , where a a and b b are positive integers.

Let g ( n ) g(n) be defined as the smallest possible positive integer y y such that f ( y ) = n f(y)=n .

If M M is the least common multiple of g ( 1 ) g(1) , g ( 2 ) g(2) , g ( 3 ) g(3) , g ( 4 ) g(4) , and g ( 5 ) g(5) , then what is f ( M ) f(M) ?


The answer is 15.

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.

1 solution

Andy Hayes
Aug 28, 2015

If a number can be expressed as a 2 b 2 a^2-b^2 , then it can be factored as ( a + b ) ( a b ) (a+b)(a-b) . Let a + b = m a+b=m and a b = n a-b=n .

Then a = m + n 2 a=\frac{m+n}{2} and b = m n 2 b=\frac{m-n}{2} . Therefore, in order for a number to be expressed as a 2 b 2 a^2-b^2 , it must be factorable into two odd numbers or two even numbers.

For odd non-perfect squares, the number of ways to express as a 2 b 2 a^2-b^2 is equal to the number of factor pairs. We can find the number of factor pairs by dividing the number of factors by 2 2 . For example, 63 63 's prime factorization is 3 2 × 7 1 3^2\times7^1 . The number of factors of 63 63 is ( 2 + 1 ) ( 1 + 1 ) = 6 (2+1)(1+1)=6 . The number of factor pairs will be 6 ÷ 2 = 3 6\div2=3 . Therefore, it can be expressed as a 2 b 2 a^2-b^2 in 3 different ways: 1 2 2 9 2 12^2-9^2 , 3 2 2 3 1 2 32^2-31^2 , and 8 2 1 2 8^2-1^2 .

For even non-perfect squares, the number of ways to express as a 2 b 2 a^2-b^2 is equal to the number of even factor pairs. For example, 24 24 has prime factorization 2 3 × 3 1 2^3\times3^1 . To find the number of even factor pairs, follow the process to find the number of factors except subtract 1 1 from 2 2 's exponent instead of adding 1 1 : ( 3 1 ) ( 1 + 1 ) = 4 (3-1)(1+1)=4 . The number of even factor pairs will be: 4 ÷ 2 = 2 4\div2=2 . Therefore, 24 24 can be expressed as a 2 b 2 a^2-b^2 in 2 different ways: 7 2 5 2 7^2-5^2 and 5 2 1 2 5^2-1^2 .

For perfect squares, the process of finding factor pairs is similar, but you must not include the factor pair in which the two factors are equal.

The process of finding g ( n ) g(n) for any positive integer involves some trial and error. I used the smallest possible primes to find numbers that have as many factor pairs (or even factor pairs in the case of even numbers) as the n n that I am trying to find g ( n ) g(n) for. This yielded:

g ( 1 ) = 3 1 = 3 g(1)=3^1=3

g ( 2 ) = 3 1 × 5 1 = 15 g(2)=3^1\times5^1=15

g ( 3 ) = 3 2 × 5 1 = 45 g(3)=3^2\times5^1=45

g ( 4 ) = 2 5 × 3 1 = 96 g(4)=2^5\times3^1=96

g ( 5 ) = 2 6 × 3 1 = 192 g(5)=2^6\times3^1=192

The least common multiple of these numbers is M = 2 6 × 3 2 × 5 1 = 2880 M=2^6\times3^2\times5^1=2880 . The number of even factor pairs of this number is ( 6 1 ) ( 2 + 1 ) ( 1 + 1 ) ÷ 2 = 15 (6-1)(2+1)(1+1)\div2=15 . Therefore f ( M ) = 15 f(M)=\boxed{15} .

We can write a simple formula for f f : f ( n ) = { 1 2 σ 0 ( n ) n 1 , 3 mod 4 0 n 2 mod 4 1 2 σ 0 ( 1 4 n ) n 0 mod 4 f(n) \;=\; \left\{ \begin{array}{lll} \big\lfloor \tfrac12 \sigma_0(n) \big\rfloor & \qquad & n \equiv 1,3 \text{ mod } 4 \\ 0 & & n \equiv 2 \text{ mod } 4 \\ \big\lfloor \tfrac12 \sigma_0(\tfrac14n) \big\rfloor && n \equiv 0 \text{ mod } 4 \end{array} \right. where σ 0 ( m ) \sigma_0(m) is the number of divisors of m m .

Mark Hennings - 5 years, 3 months ago

Log in to reply

Are you sure it's the floor function you want? For n=1, your formula yields 0, yet 1=1^2-0^2.

Joe Mansley - 2 years, 8 months ago

Log in to reply

Note that 0 0 is not a positive integer (it is, however, nonnegative).

Mark Hennings - 2 years, 8 months ago

Log in to reply

@Mark Hennings Ahh, I see. Thank you.

Joe Mansley - 2 years, 8 months ago

Yes Same Way. I calculated all the g(n) using the concept of number of factors.

Kushagra Sahni - 5 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...