mersenneforum.org Square numbers and binary representation
 Register FAQ Search Today's Posts Mark Forums Read

 2010-05-28, 12:46 #1 ET_ Banned     "Luigi" Aug 2002 Team Italia 25·151 Posts Square numbers and binary representation I just noticed (after reading a book from Roberto Vacca) that a perfect square number turned into binary form has the second digit from right always equal to zero. Code:  22 = 4 = 100 32 = 9 = 1001 42 = 16 = 10000 52 = 25 = 11001 62 = 36 = 100100 72 = 49 = 110001 82 = 64 = 1000000 92 = 81 = 1010001 102 = 100 = 1100100 112 = 121 = 1111001 132 = 169 = 10101001 192 = 361 = 101101001 This depends on the fact that during multiplication, the four possibilities (00x00, 01x01, 10x10, 11,11) always bring to a "0" in the second place from right. I know there should be a theorem in Number Theory (published in Computational Mathematics, IIRC) related to statistical presence of "zeroes" and "ones" in binary representation of square numbers. Any hints? Luigi
2010-05-28, 12:59   #2
R.D. Silverman

Nov 2003

746010 Posts

Quote:
 Originally Posted by ET_ I just noticed (after reading a book from Roberto Vacca) that a perfect square number turned into binary form has the second digit from right always equal to zero. This depends on the fact that during multiplication, the four possibilities (00x00, 01x01, 10x10, 11,11) always bring to a "0" in the second place from right.
No. What is really happening is quite simple. All squares are 1 mod 4.
And this is all there is to it.
Quote:
 I know there should be a theorem in Number Theory (published in Computational Mathematics, IIRC) related to statistical presence of "zeroes" and "ones" in binary representation of square numbers.
What do you mean by "statistical presence"?? This is not well defined.

2010-05-28, 13:41   #3
Jens K Andersen

Feb 2006
Denmark

2×5×23 Posts

Quote:
 Originally Posted by R.D. Silverman No. What is really happening is quite simple. All squares are 1 mod 4. And this is all there is to it.
All odd squares are 1 mod 4. All even squares are 0 mod 4. In either case the second bit from the right is 0. ET gave a correct argument for that. He may not have formulated it the same way a mathematician typically would and it's a trivial observation but I don't think it's fair to say "No" to him.

2010-05-28, 13:51   #4
R.D. Silverman

Nov 2003

746010 Posts

Quote:
 Originally Posted by Jens K Andersen All odd squares are 1 mod 4. All even squares are 0 mod 4. In either case the second bit from the right is 0. ET gave a correct argument for that. He may not have formulated it the same way a mathematician typically would and it's a trivial observation but I don't think it's fair to say "No" to him.
Is this not a sub-forum for *mathematical* discussion? Look at the
forum title.

 2010-05-28, 14:06 #5 cmd     "(^r'°:.:)^n;e'e" Nov 2008 ;t:.:;^ 33·37 Posts to Luis : s..pari ..°° di(s)_im_pari ..°' ( it ) ghe duma (a_mo) do po-si-bi-li-tà e do_po dem via ... in un alter "pais" magari del quart mund '° ... dan_y ?! Last fiddled with by cmd on 2010-05-28 at 14:57 Reason: it
2010-05-28, 14:21   #6
Jens K Andersen

Feb 2006
Denmark

2×5×23 Posts

Quote:
 Originally Posted by R.D. Silverman Is this not a sub-forum for *mathematical* discussion? Look at the forum title.
I don't know whether it was first posted here or moved but I saw it in Miscellaneous Math Threads which doesn't have high math expectations (although you appear to generally have higher expectations of posters than anybody else at all of mersenneforum.org).
ET's post was mathematical regardless of formulation and it seemed more correct than your reply. You said "No" to a valid argument and forgot to include even squares in your own argument. Your posts usually have a high mathematical level and I'm sure you are better at mathematics than ET and me. I just think you were a little too fast in this case.

2010-05-28, 15:17   #7
cmd

"(^r'°:.:)^n;e'e"
Nov 2008
;t:.:;^

33×37 Posts
ps it

Quote:
 Originally Posted by cmd to Luis : s..pari ..°° di(s)_im_pari ..°' ( it ) ghe duma (a_mo) do po-si-bi-li-tà e do_po dem via ... in un alter "pais" magari del quart mund '° ... dan_y ?!
... canta che ti passa ...

miiET cit-y

( no tifosi )

2010-05-28, 18:50   #8
R.D. Silverman

Nov 2003

22·5·373 Posts

Quote:
 Originally Posted by Jens K Andersen (although you appear to generally have higher expectations of posters than anybody else at all of mersenneforum.org). .
Would you prefer that I change my expectations to assume that people
posting here are incompetent? I would think that they would find that
insulting.

Is there something wrong in having an expectation of competency?

 2010-05-28, 19:01 #9 cmd     "(^r'°:.:)^n;e'e" Nov 2008 ;t:.:;^ 33×37 Posts @ET_ cmd=crapa-"sempre+pelada" ... solo l'ultimo minuto ti può interessare ... il resto è no_ia, ( segui bene il foglio e nota il grafico ) vedi i colori rosa ed azzurro ?! Last fiddled with by cmd on 2010-05-28 at 19:17 Reason: A.G.G.itur
2010-05-28, 21:18   #10
Jens K Andersen

Feb 2006
Denmark

2×5×23 Posts

Quote:
 Originally Posted by R.D. Silverman Would you prefer that I change my expectations to assume that people posting here are incompetent?
No, but I would sometimes prefer a change in attitude towards people who don't live up to your expectations. This is an Internet forum, not an advanced math class. Experience indicates that when you react to mathematical shortcomings in posters, the thread often goes downhill. It happens more rarely when others react to the same shortcomings in a different tone. You may blame incompetent posters for it but if a bad pattern persists then you can argue about whose fault it is, or you can try to change the pattern.

2010-05-28, 21:30   #11
R.D. Silverman

Nov 2003

22×5×373 Posts

Quote:
 Originally Posted by Jens K Andersen No, but I would sometimes prefer a change in attitude towards people who don't live up to your expectations. This is an Internet forum, not an advanced math class..
Computational number theory is a moderately advanced mathematical
subject.

It is also not a subject for those who lack
mathematical maturity.

It is a subject for those who have mastered
(at least) secondary school algebra.

 Similar Threads Thread Thread Starter Forum Replies Last Post mahbel Miscellaneous Math 192 2017-06-30 13:44 davar55 Programming 24 2014-12-07 00:19 James Heinrich Miscellaneous Math 10 2012-03-08 07:20 only_human Miscellaneous Math 9 2009-02-23 00:11 TTn 15k Search 0 2004-12-18 21:10

All times are UTC. The time now is 14:13.

Mon Nov 29 14:13:52 UTC 2021 up 129 days, 8:42, 0 users, load averages: 1.05, 1.17, 1.23