mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Miscellaneous Math (https://www.mersenneforum.org/forumdisplay.php?f=56)
-   -   Next perfect square after 2^n. (https://www.mersenneforum.org/showthread.php?t=18035)

soumya 2013-03-28 01:58

Next perfect square after 2^n.
 
What will be the next (nearest) perfect square after 2^n (where n is a positive odd integer)? Can you suggest a formula or an algorithm for finding the next perfect square after 2^n?

Batalov 2013-03-28 02:06

It will be (isqrt(2[SUP]n[/SUP])+1)^2, where isqrt is [URL="http://en.wikipedia.org/wiki/Integer_square_root"]easily calculated[/URL]


All times are UTC. The time now is 07:54.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.