plusquamperfect squares
[This article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
For some perfect squares, when you remove the last digit, you get another perfect square. The first five perfect squares are 16, 49, 169, 256 and 361. What are the next three ones? Is there a more than perfect square other than 169 such that removing the last two digits returns a perfect square?
Writing an R code for plusquamperfect squares is straightforward and returns the following first 20 values
[1] 16 49 169 256 361 1444 [7] 3249 18496 64009 237169 364816 519841 [13] 2079364 4678569 26666896 92294449 341991049 526060096 [19] 749609641 2998438564
Adding the second constraint does not return a solution other than 169.
To leave a comment for the author, please follow the link and comment on their blog: R – Xi'an's Og.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.