I have been playing with primes and powers and came up with
this equation.
(n+1)3 -n3 =P1*P2*...*Pnth
Where the result is only divisible by itself, 1 and exclusively
primes and no other numbers.
I have not yet found a counter example to this relationship and
am windering whether someone can either prove it wrong, tell me
it's obvious or tell me i have found something. (I don't think i
have but someone needs to show me why)THANKS.
I think I understand what you mean now, but I'm just checking.
You want to show that A = (n+1)3 - n3 =
p1 xp2
If A = (n+1)3 - n3 = p1 x
p2 x p3
this would count as a counterexample because A is then divisible
by (p1 x p2 ), which is not prime. So we
need either a proof that (n+1)3 - n3 is the
product of two primes only or a proof (or counterexample) to show
that (n+1)3 - n3 may be divisible by more
than two primes.
This is the problem as I see it. Comments?
A counterexample
1253 - 1243 = 13 x 3577
3577 is not a prime. It is divisible by 7 and 511.
Patrick, if what Tom has written has answered your question then feel free to ignore this. I read your question as talking about square-free numbers, numbers which have no repeated prime factors, i.e. 3 x 5 x 7 x 11 is square-free whereas 3 x 5 x 72 or 73 x 13 x 17 are not square-free as they both have 72 as a factor. If this is what you are talking about then obviously Tom's counterexample isn't a counterexample as it is square-free, I'm trying to find a non square-free number that is a counterexample but as I said above if this isn't what you're asking about then please ignore!
If n is 7, then we get 83 -73
=169=132 . Also for n=22 we have 1519, which is
divisible by 72 .
However, this sequence does seem to have an surprising density of
square-free numbers.
Two counterexamples, 723 -713
=72 x 313
and 233 -223 =72 x 31
If a number has a square factor then quite a lot of the time
this will be because it has a factor of 4,9 (these are the
easiest squares to be divisible by, as they are the lowest two
non-unit squares). Now as it happens it is easy to see that
(n+1)3 -n3 can never be divisible by 4 or 9
(because it can be written as 3n(n+1)+1, which is one more than a
multiple of 6). Therefore it must divide by a larger square (25
or higher bearing in mind that 16 is also out) in order to
contain a square factor. So that may be a partial explanation for
why there appear so few square factors in this sequence.
Michael
Oh and it appears 25 is out too as (n+1)3
-n3 cannot be divisible by 5 ever (you can check this
by substituting in n = 0,1,2,3,4). So any integer with a square
factor would have to be divisible by 49 (or a higher square
still). So now it is maybe not so surprising that there are so
many integers in the sequence without square factors.
49 cannot be discounted in this way. If n leaves a remainder of 1
when divided by 7 then (n+1)3 -n3 will be
divisible by 7. So perhaps 49 is possible.
Yours,
Michael
Ran test on sequence, got up to n = 3645 before I got bored of waiting. Found 235 numbers with square factors in sequence.
Here are the first few squares which it is possible for
(n+1)3 -n3 to be divisible by (according to
a simple VB program):
72
132
192
312
372
432
(492 )
612
672
732
792
(912 )
972
1032
1092
1272
(1332 )
1392
1512
I put the non-primes in brackets because these aren't actually
building blocks (any number that is divisible by one of the
squares in brackets is divisible by a smaller square in the
list).
I think it is the absence of 22 , 32 ,
52 which causes the shortage of numbers with square
factors. (Also to a much lesser extent the absence of
112 , 172 .)
Michael
Do you think it would be possible to calculate exactly the
density of square-free numbers in this sequence? It seems to
approach about 0.06, from testing n up to 1000.
Dvaid
Well that would probably be very hard, but I was thinking
about something you said earlier - about the overall proportion
of integers without square factor being 6/pi 2 . What
do you think of the following?
For prime n define f(n) as overall the proportion of all integers
which have a factor of 22 , 32 ,
52 , 72 , ? or n2 . (So they can
have any prime square factor < = n2 .) This would
have to be done by taking the result over the first Q integers
only and letting Q -> infinity. For the time being let's
assume the limit exists.
Let r,s be adjacent primes (r < s and there is no prime p such
that r < p < s). Now if C is large then out of the integers
1,2,3,...,C about C/s2 have a factor of s2
. Of these C/s2 f(r) also have a prime square factor
below s2 . (Because all prime numbers are mutually
coprime so having one prime square factor doesn't affect the
likelihood of having another one below it. The factors are
totally independent.)
So number of numbers out of 1,2,...,C that have s2 as
their lowest prime square factor is:
C/s2 - f(r) C/s2
And number of numbers that have a prime square factor
r2 or below is:
C f(r).
Add these together to find the number of numbers with a prime
square factor s2 or below (which is C f(s)):
C f(s) = C f(r) + C/s2 - f(r) C/s2
f(s) = f(r) + 1/s2 - f(r) /s2
Now let's define g(x) = 1 - f(x) which is what we are actually
interested in (no. of square free numbers of particular
factors).
1 -g(s) = 1 -g(r) + g(r)/s2
So:
g(s) = g(r) [1-1/s2 ]
Now g(2) = 3/4 obviously (1/4 of all numbers have a factor of 4).
Remembering r,s are adjacent primes:
g(3) = [1-1/9]g(2)
g(5) = [1-1/25][1-1/9]g(2)
In general it is easy to see by induction that:
g(p) = [1-1/22 ][1-1/32 ][1-1/52
][1-1/72 ][1-1/112 ]...[1-1/p2
]
Now lim(p-> infinity ) g(p) = overall proportion of square
free integers (as we are gradually removing all the
factors).
And David says this could well be 6/pi 2 . If so we
just have to show:
6/pi 2 = [1-1/22 ][1-1/32
][1-1/52 ][1-1/72 ][1-1/112
]...
But that looks like quite a daunting infinite product on the
right. Help, anyone?
Yours,
Michael
Actually now I think about it that result isn't nearly as hard as it looks. First of all a simple induction proof reveals:
If you consider;
[ 1 + 1/(2s ) + 1/(22s ) +
1/(23s ) + ...] x [ 1 + 1/(3s ) +
1/(32s ) + 1/(33s ) + ...] x[ 1 +
1/(5s ) + 1/(52s ) + 1/(53s ) +
...] x [ 1 + 1/(7s ) + 1/(72s ) +
1/(73s ) + ...] x.... where each square bracket has a
prime series in it, then when this is expanded it equals 1 +
1/(2s ) + 1/(3s ) + 1/(4s ) +
1/(5s ) + .... because of unique factorisation of
integers.
As 1 + 1/(ns ) + 1/(n2s ) +
1/(n3s ) + ... = 1/[1 - 1/(ns )] then this
gives the infinite product form of the zeta function as Michael
has written above (this was how Euler discovered the
relation).
In regard to the density of squarefree numbers in the sequence (n
+ 1)3 - n3 = 3n2 + 3n + 1, I
think it equals;
[1 - (2/72 )] x [1 - (2/132 )] x [1 -
(2/192 )] x [1 - (2/312 )] x [1 -
(2/372 )] x .... where each of the brackets is equal
to [1 - (2/p2 )] where p is a prime of the form 6a +
1. I'm not certain of it but I can show that 3n2 + 3n
+ 1 is divisible by no prime of the form 6a - 1 so obviously
cannot be divisible by a prime of the form 6a - 1 squared. I'm on
my way to proving that the proportion of numbers of the form
3n2 + 3n + 1 that are divisible by p2 is
2/p2 where p is a prime of the form 6a + 1. The above
formula comes from a similar idea as the infinite product for the
general proportion of squarefree numbers. I'll explain this
further if I manage to actually get an answer.
Andrew - I'd completely missed the mod 6 connection! Yes
you're right that 3n2 + 3n + 1 cannot be divisible by
6k-1. But I had to use Gauss's theorem of Quadratic Reciprocity
(see here
for anyone who doesn't know this theorem) to prove it via
(6n+3)2 = -3 (mod 6k-1). (It does hold for negative
primes doesn't it?) Can you do it otherwise?
In fact do you know of anywhere I could find a proof of Gauss's
Theorem of Quadratic Reciprocity? I hadn't even heard of it
before the Fibonacci discussion. From what I've done it appears
to be unbelievably useful. I've already spent about an hour
trying to prove it this morning and I've got absolutely nowhere
which is not surprising if Gauss was the first one to derive
it!
Anyway for prime 6k+1 we want:
3n2 + 3n + 1 = 0 (mod 6k+1)
Then we know that as 6k+1 is prime it is valid to write:
n = (-3 +- sqrt(-3))/6 (mod 6k+1)
where sqrt(-3) is equivalent to an integer via Gauss's theorem of
Quadratic Reciprocity, and fractions are also equivalent to an
integer because of Euclid's algorithm (which is explained
somewhere else on NRICH). And so we have two valid values for
which differ by an integer equivalent to:
sqrt(-3)/3, and this not equivalent to 0 as this would mean -3 =
0 (mod 6k+1).
So there are indeed exactly 2 values n that satisfy:
3n2 + 3n + 1 = 0 (mod 6k+1)
if 6k+1 is prime. The two values for n (a,b) which satisfy this
equation are related:
a + b = 6k
But as for dividing by (6k+1)2 ... I'm not sure. The
solutions certainly come in pairs (this is easy to show). But how
to prove there are any at all??
Just a comment on your suggested infinite product. I'm pretty
sure you're right, but you are using the probability relation P(A
and B) = P(A) x P(B) which only holds when A,B are independent.
So we have to show that a member of a sequence being divisible by
one particular prime is independent of it dividing by another
given prime. But I think we're OK here. Because to mod p
the sequence 3n2 + 3n + 1 goes in cycles of length p
(p prime). As any two given primes are coprime then the lengths
of the two sequences are coprime so I think I agree it is
independent, so your relation should hold. I'll need to convince
myself of this properly soon.
So if that's OK then all that remains is to be proven is that for
prime p = 1 (mod 6) there exists an integer a such that:
3a2 + 3a + 1 = 0 (mod p2 )
or equivalently there exists b such that:
12b2 + 1 = 0 (mod p2 ).
Yours,
Michael
Would it help if I mentioned all primes above 3 are of the form 6k +- 1, or do you know that already? Might help you later on to save time
Gauss gave eight proofs of the quadratic reciprocity law and
there are apparently over 50 floating around in the literature, I
have a proof in a book but its pretty long and refers to other
theorems in the book so I can't write it all out here, sorry! I
expect you'll be able to find one on the internet somewhere or in
a number theory book.
Why is sqrt(-3) equivalent to an integer?
I agree that 3n2 + 3n + 1 = 0 (mod 6k+1) (*) has two
solutions and am also not sure about the case with
(6k+1)2 .
This may help though,
if a is a solution to (*) then (a + yp) is also a solution where
p = 6k+1 and we'll assume there is a value of y = t such that
f(a+tp) is divisible by p2 .
If f(n) = 3n2 + 3n + 1 then using the Taylor series,
f(a + tp) = f(a) + tp x f'(a) + t2 p2 x
f''(a)/2 and all further terms are equal to 0 as f''(x) is
constant.
Taking this modulo p2 and using f''(x)=f''(a)=6,
f(a+tp) = f(a) + tp x f'(a) + 3 x t2 p2
(mod p2 ) but f(a+tp) is presumed to be divisible by
p2 and 3 x t2 p2 is so we are
left with;
f(a) + tp x f'(a) = 0 (mod p2 )
f(a) = -tp x f'(a) (mod p2 )
and as f(a) is divisible by p,
t x f'(a) = -f(a)/p (mod p2 )
f'(a)=3 x (2a + 1) so
3 x t x (2a + 1) = -(3n2 + 3n + 1)/p(mod p2
).
This is a linear equation in t which should probably be solvable
but I'm still working on it.
I know what you mean about the independent bit, in the general
square free number theory above it works because 1/p2
of the integers are divisible by p2 where p is a prime
and 1/q2 of the integers are divisible by
q2 where q is a prime and we can prove that
1/(pq)2 of the integers are divisible by
(pq)2 so the proof is OK. I can't prove however the
equivalent for the 3n2 + 3n + 1 idea. Any ideas?
DOH!!! Yes of course you're correct. I tried a similar thing
but made a horrendous algebraic blunder, so that I got a
quadratic relationship with t not a linear one which made it
unworkable. I think you can avoid Taylor's series though:
If there exists a so that 0 < = a < = p-1and
f(a) = 3a2 + 3a + 1 = 0 (mod p)
then we can write:
3a2 + 3a + 1 = kp (mod p2 )
Now we know that:
f(a+tp) = 3(a+tp)2 + 3(a+tp) + 1 = 3a2 + 3a
+ 1 + 3t(2a+1)p = p[k + t x 3(2a+1)] (mod p2 )
So we require:
k + t x 3p(2a+1) = 0 (mod p)
Now 2a+1 is coprime with p if 0 < = a < = p-1 so by
Euclid's algorithm there is a solution for t in:
t x 3p(2a+1) = 1 (mod p) [if you don't know what Euclid?s
algorithm is, I can direct you to the discussion where I learnt
about it first].
And multiplying both sides of that equation by q reveals that
there is a solution for t in:
t x 3p(2a+1) = q (mod p)
as well for all q. Therefore as the left hand side is periodic
(with sequence length = p) we can see that there is exactly ONE
solution in t for:
k + t x 3p(2a+1) = 0 (mod p)
for a given a.
But there are two possible values for a as we have agreed. They
will each have an associated value for t.
In fact there can never be one solution because f(n) =
f(p2 -1-n) (mod p2 ) and if you set n =
(p2 -1)/2 you find that 1 = 0 (mod p2 )
which is a contradiction. So there are indeed two solutions
for
3n2 + 3n + 1 = 0 (mod p2 ) where prime p =
1 (mod 6) as we were hoping.
Just one minor correction to what you wrote. You said:
3 x t x (2a+1) = -(3n2 + 3n + 1)/p (mod p2
)
when I think you meant:
3 x t x (2a+1) = -(3n2 + 3n + 1)/p (mod p). Otherwise
I agree with everything you've done.
Yours,
Michael
Sorry - I appear to have gained a p in the equations mod p.
They should have read:
k + t x (2a+1) = 0 (mod p)
then
t x 3(2a+1) = 1 (mod p)
etc.
Please try to ignore all the ps in the mod p equations. If
someone out there has the power to remove them then I'd be
extremely grateful.
Very sorry about that,
Michael
PS Neil - yeah thanks, I was already aware of that. Andrew's
point is that the only primes that do occur in this sequence are
6k+1 never 6k-1...
Right so I think where we're at is that the equation
3n2 + 3n + 1 has two distinct solutions modulo
p2 where p is of the form 6x + 1and no solutions where
p is of the form 6x -1, as there are no solutions where p = 2 or
3 this covers all the primes.
Yes, the p2 should have been a p, I used the Taylor
expansion because it comes from a more general theory for finding
solutions to f(x) = 0 (mod pj ) where you find
solutions mod p then mod p2 then mod p3
etc.
As I see the problem the final step is proving that if
p1 , p2 , p3 ,... are distinct
primes of the form 6x + 1, the equation 3n2 + 3n + 1 =
0 (mod (p1 xp2 x ... x pn
)2 ) has 2n distinct solutions.
Here follows a proof of the quadratic reciprocity law, I tried
scanning the book I have and it came out much better than I
thought it would so didn't take too long to do. I don't think we
need some of what I called theorem 2 but didn't want to risk
removing bits we do need by mistake.
Theorem 1;
Lemma of Gauss. For any odd prime p let (a,p) = 1. Consider the
integers a, 2a, 3a, ..., {(p - 1)/2}a and their least positive
residues modulo p. If n denotes the number of these residues that
exceed p/2, then (a/p) = (-1)n .
(a/p) is the Legendre symbol, see the last thing I wrote in
Fibonacci in clock arithmetic for a definition.
Proof;
Andrew -many many thanks for including that derivation.
You said it didn't take you long but you must have spent ages
putting in all those sums and subscripts. I'm extremely
grateful.
I'm no longer ashamed of not being able to prove the theorem when
I had a go a couple of days ago. It is amazing! But equally
amazing is the fact that I think I understand it. I think the
absolute key behind the whole thing is that r1 ,
r2 ..., p-s1 , p-s2 , ...are
just the integers 1,2,3,...,(p-1)/2 in a different order. This is
an amazing discovery.
Once again many, many thanks.
Sqrt(-3) -I've got no idea on whether it is standard to write it
like this, but I think I've proved that there aren't any
contradictions if the base we're working to is prime
.
What sqrt(-3) means (to me) is that if x = sqrt(-3) then
x2 = -3. So if x = sqrt(-3) (mod p) then x2
= -3 (mod p). An example to show the kind of thing I meant.
Let x = sqrt(-3) (mod 7).
Now -3 = 4 (mod 7)
So x = sqrt(4) (mod 7) = ±2 (I'm not sure whether it is a
good idea to take one over the other by convention. On the whole
I think not.)
In general there can't be more than 2 values because if
a2 = b2 (mod p)
then
(a-b)(a+b) = 0 (mod p)
So either a = b (mod p) or a = -b (mod p), so there are 2
solutions.
Sometimes there isn't a value for sqrt(x) under a prime base. I
think you've been calling these ?quadratic non-residues?.
Now you may ask why is this useful. Well maybe it isn't. But I
was using it as follows.
We want to solve 3n2 + 3n + 1 = 0 (mod p) [this is
from my last but one message].
Quadratically:
n = (-3±sqrt(9-12))/6 = (-3±sqrt(-3))/6 (mod
p)
Now when does it have a solution? Well as p is prime, if there is
a solution for sqrt(-3) then there is also a solution for n as
you're allowed to do things like dividing through by 6 with prime
bases (I think).
So we need sqrt(-3) to have a value. By Gauss's reciprocity law
(as -3 =/= 3 (mod 4)):
x2 = -3 (mod p)
has a solution if and only if:
x2 = p (mod -3) is soluble.
Now this is true if p = 1 (mod 3) but not true if p = -1 (mod 3).
Therefore as you noticed the original equation does have
solutions if p = 1 (mod 6) but not if p = -1 (mod 6). And we can
also see if the solutions you get for p = 1 (mod 6) are
identical. (i.e. if the quadratic has a repeated solution). If it
did then:
(-3+sqrt(-3))/6 = (-3-sqrt(-3))/6 (mod p)
So:
sqrt(-3) = -sqrt(-3) (mod p)
2sqrt(-3) = 0 (mod p)
Squaring:
4(-3) = (mod p)
So p has to be 3 (we are not bothering about 2 in this as Gauss's
law doesn?t even work for it). And indeed p = 3 is the only other
prime to have one solution. Anything higher doesn't satisfy 12 =
0 (mod p).
So there are indeed two distinct solutions to the equation.
You could say it just amounts to a different way of writing
things, perhaps it isn't done by anybody but me! It just seemed
sort of natural.
I think I've proved your infinite product formula. But it is a
bit fiddly (not hard) and I would like to make sure I don't make
as many mistakes as usual. Unfortunately I won't be able to write
for two weeks (starting tomorrow 7 am). I'll try to post my proof
this evening or early tomorrow for you to comment on. It is
really only a matter of organising easy ideas.
I look forward to seeing how the discussion has developed over
the next two weeks. (I'm going to try to get hold of and read a
copy of the book I started at school: ''From Polynomials to
Sums of Squares ''as this looked like it had a lot of good
stuff that might help us here.)
See you,
Michael
Michael, have a nice holiday (I assume!).
The formatting didn't take too long as you get into a rhythm and
also I'd done the first half without too much formatting before
noticing the numerous sigmas.
I understand how you're using the square roots now, I also think
its probably OK but I think its not recognised because of the
fact that as in your example sqrt(-3) is equivalent to 2
different integers mod 7 whereas a constant is assumed to be
equivalent to only one integer in modular arithmetic. I think
that if we use it with care then we're probably OK.
The way that I solved the quadratic was;
in general if we want to solve ax2 + bx + c = 0 (mod
p) assuming that a isn't a multiple of p(odd prime) then multiply
the equation by 4a and complete the square to get
(2ax + b)2 = b2 - 4ac (mod p)
so in our case we get (3 x (2x + 1))2 = -3 (mod p) and
as 3 x (2x+1) for x from 1 to p are just a rearrangement of the
integers 1 to p (mod p) the equation reduces to v2 =
-3 (mod p) which is what you had.
Yes, the last part of the proof isn't too difficult, I thought it
was going to be really bad because I thought that we would need
to find the solutions for a particular prime 6x+1 (mod
(6x+1)2 ) and then show that they intersected with the
other primes at convenient places but then found a way to avoid
this, I'll write it out in due course.
Any idea what the infinite product actually equals in a closed
form?
Hi Andrew,
Yeah, you're right about square roots, and it being a bit
confusing as it's multivalued. And completing the square was the
obvious alternative to the way I did it. (I did that too as a
check.)
Just to quickly outline the proof. Ithink I've simplified it a
bit.
The sequences a,a+p2 ,a+2p2 ,... and b,
b+q2 ,b+2q2 ,...
intersect at numbers at an interval of p2
q2 as can be seen by Euclid's algorithm (and then
comparing prime factors of the relavant equation).
But concerning our sequence f(n) 3n2 + 3n + 1 we have
to duplicate this four times as f(p2 -1-n)=f(n) (mod
p). So in an interval of p2 q2 you get a
single intersection of:
a,a+p2 ,a+2p2 and b, b+p2
,...
and then one when you replace a with p2 -1-a, another
when you replace b with p2 -1-b, and another when you
replace both.
So the chance of a prime in the sequence dividing p2
and q2 is 4/p2 q2 . This means
that the probability relation:
P(A)P(B) = P(A and B)
is satisfied for A = divides by p2 , B = divides by
q2 . Now do the same for showing that events dividing
by p2 q2 and r2 are also
independent, and all other combinations. It is very easy to see
all events are independent.
Therefore not dividing by p2 is independent of not
dividing by q2 . And so on. Therefore the probability
relation holds.
I'm sorry if that was a bit rushed...
Anyway, we can compare notes on the infinite product in two weeks
time.
Michael
Andrew - any luck with the infinite product? I had a go at it
about a week ago and got an interesting intermediate result but I
can't do the problem at the moment. Of course it is tempting to
suspect that there is no closed form solution...
Thanks,
Michael
No luck I'm afraid, I can't even find a solution by trial and error using pi and e etc, maybe there isn't a solution.
Hi Andrew,
Yes, I also suspect there isn't a solution in closed form. (I
don't know how you'd go about proving things like that though.) I
really thought there was one because I had a method using
periodicity properties of complex numbers which looked quite
promising. But it simply doesn't work so there's not much point
in even writing about it. I'll have another go tomorrow though.
If there is a way of doing it I think we're going to have to be a
lot more creative than my attempts so far!
There's a web page you might find useful, called the "Inverse Symbolic Calculator" (a quick search on Yahoo or something should bring this page up). You type in a number, and it suggests possible closed forms for it, by comparing with a huge database of possibilities. You might like to give that a go for your infinite product.
Thanks Dan. I tried to find it numerically using VB and if you
consider primes less than 3.5 x 106 then I think the
number comes out as:
0.934842033
but I'm not condident after the 6th decimal place. Plugging this
into the website you mentioned (which looks incredibly useful
generally) it suggested:
1) A root of a quintic equation with integral coefficients.
2) An infinite product which was a lot more complicated than the
one we're considering.
I suspect neither of these are correct. I'll see if I can find a
few more decimal places and try again.
Thanks,
Michael
Thanks Michael, that whole discussion was pretty interesting.