Crikey Math

Having fun exploring mathematics

  • Home
  • About
  • Blog
  • Contribute
en English
af Afrikaanssq Albanianam Amharicar Arabichy Armenianaz Azerbaijanieu Basquebe Belarusianbn Bengalibs Bosnianbg Bulgarianca Catalanceb Cebuanony Chichewazh-CN Chinese (Simplified)zh-TW Chinese (Traditional)co Corsicanhr Croatiancs Czechda Danishnl Dutchen Englisheo Esperantoet Estoniantl Filipinofi Finnishfr Frenchfy Frisiangl Galicianka Georgiande Germanel Greekgu Gujaratiht Haitian Creoleha Hausahaw Hawaiianiw Hebrewhi Hindihmn Hmonghu Hungarianis Icelandicig Igboid Indonesianga Irishit Italianja Japanesejw Javanesekn Kannadakk Kazakhkm Khmerko Koreanku Kurdish (Kurmanji)ky Kyrgyzlo Laola Latinlv Latvianlt Lithuanianlb Luxembourgishmk Macedonianmg Malagasyms Malayml Malayalammt Maltesemi Maorimr Marathimn Mongolianmy Myanmar (Burmese)ne Nepalino Norwegianps Pashtofa Persianpl Polishpt Portuguesepa Punjabiro Romanianru Russiansm Samoangd Scottish Gaelicsr Serbianst Sesothosn Shonasd Sindhisi Sinhalask Slovaksl Slovenianso Somalies Spanishsu Sudanesesw Swahilisv Swedishtg Tajikta Tamilte Teluguth Thaitr Turkishuk Ukrainianur Urduuz Uzbekvi Vietnamesecy Welshxh Xhosayi Yiddishyo Yorubazu Zulu

2017 and other prime years

January 8, 2018 By Gary Ernest Davis

Alexander Bogomolny (@CutTheKnotMath) has a nice post “A Farewell Problem for the Year 2017” on his website Cut The Knot.

The problem is to find the least positive integer n for which n(n+2017) is a perfect square.

The proof on the Cut The Knot webpage shows also shows that there is, in fact, only one such n .

A key part of the proof is that 2017 is a prime number.


What would happen if 2017 were replaced by an arbitrary prime number p ?

Could we still prove that there is exactly one positive integer n for which n(n+p) is a perfect square?

Well, no, because n(n+2) can never be a perfect square: if n(n+2)=k^2 for some integer k then n=\sqrt{k^2+1}-1 which is not an integer when k is an integer.

We can see that the primes 3 and 5 are OK because 1\times(1+3) is a perfect square, as is 4\times(4+5).

On the assumption that for all odd primes p we can find a positive integer n for which n(n+p) is a perfect square, we can write a Mathematica code snippet to find the least such n given the k^{\textrm{th}} prime:

primefunc[k0_] := Module[{k = k0, n}, n = 1; While[IntegerQ[Sqrt[n*(n + Prime[k])]] == False, n++]; n]

This tells us what works for p=3 and p=5

primefunc[2]

1

primefunc[3]

4

So, assuming the Mathematica code halts for odd primes we can create a table of pairs

(primes p, least n such that n(n+p) is a perfect square):

T = Table[{Prime[n], primefunc[n]}, {n, 2, 100}]
ListPlot[T]

{{3,1},{5,4},{7,9},{11,25},{13,36},{17,64},{19,81},{23,121},{29,196},{31,225},{37,324},{41,400},{43,441},{47,529},{53,676},{59,841},{61,900},{67,1089},{71,1225},{73,1296},{79,1521},{83,1681},{89,1936},{97,2304},{101,2500},{103,2601},{107,2809},{109,2916},{113,3136},{127,3969},{131,4225},{137,4624},{139,4761},{149,5476},{151,5625},{157,6084},{163,6561},{167,6889},{173,7396},{179,7921},{181,8100},{191,9025},{193,9216},{197,9604},{199,9801},{211,11025},{223,12321},{227,12769},{229,12996},{233,13456},{239,14161},{241,14400},{251,15625},{257,16384},{263,17161},{269,17956},{271,18225},{277,19044},{281,19600},{283,19881},{293,21316},{307,23409},{311,24025},{313,24336},{317,24964},{331,27225},{337,28224},{347,29929},{349,30276},{353,30976},{359,32041},{367,33489},{373,34596},{379,35721},{383,36481},{389,37636},{397,39204},{401,40000},{409,41616},{419,43681},{421,44100},{431,46225},{433,46656},{439,47961},{443,48841},{449,50176},{457,51984},{461,52900},{463,53361},{467,54289},{479,57121},{487,59049},{491,60025},{499,62001},{503,63001},{509,64516},{521,67600},{523,68121},{541,72900}}

 

 

 

 

 

 

We can notice fairly readily, that the values for n we got, for a given odd prime p , are themselves all perfect squares, and, in fact, n= (\frac{p-1}{2})^2 .

Could this be correct for all odd primes p ?

Sure!

The first thing to notice is that if p \geq 3 is odd then n= (\frac{p-1}{2})^2 is a positive integer and n(n+p) = (\frac{p^2-1}{2})^2 is a perfect square.

This bit doesn’t depend on p being prime.

That this is the only positive integer n for which n(n+p) is a perfect square, does rely on p\geq 3 being prime and odd.

In fact, we can simply modify the argument at the post “A Farewell Problem for the Year 2017“:

if n(n+p) is a perfect square and n is not a perfect square, then n  has a factor that is shared with n+p and, hence, with p. But p is prime so the only possibility is n=s^2p , implying n(n+p)=(ps)^2(s^2+1) which can not be a perfect square unless s=0 .

So both n and n+p  are perfect squares, say n=a^2, n+p=b^2. From this we have (b-a)(b+a)=p , which is prime, so b-a=1, b+a=p  which means a =\frac{p-1}{2}, b=\frac{p+1}{2}.


In other words, if p \geq 3 is an odd prime then n= (\frac{p-1}{2})^2 is the unique positive integer for which n(n+p) is a perfect square.

http://www.crikeymath.com/wp-content/uploads/2017/09/crikey.wav

Filed Under: Uncategorized

Recent Posts

  • Does the DNA test say guilty or not guilty?
  • The Turtleback Diagram for Conditional Probability
  • Numbers that, base 2, are blindingly obviously divisible by 3
  • A mysterious sequence of 1s and 2s
  • Does one have to be a genius to do mathematics? Neither necessary nor sufficient.
  • Alexander Bogomolny
  • Binary disjoints of an integer
  • A cycle of length 5 for iterated squaring modulo a prime
  • The diagonal of the Wythoff array
  • Leonardo Bigollo, accountant, son of Bill Bonacci

Archives

© Crikey Math, 2017-2018