# How to find all naturals $n$ such that $\sqrt{1 {\underbrace{4\cdots4}_{n\text{ times}}}}$ is an integer?

How to find all naturals $n$ such that $\sqrt{1\smash{\underbrace{4\cdots4}_{n\text{ times}}}}$ is an integer?

-
Do you mean $\sqrt{1\underbrace{4\cdots4}_{n-times}}$ or perhaps$\sqrt{\underbrace{1414\cdots14}_{n-times}}$? – Quixotic Jul 14 '12 at 1:24
I mean The first one . – Frank Jul 14 '12 at 1:27

1
There will be only two integer cases for $n = 2$ and $n = 3$ and for everything else $$\sqrt{1\underbrace{4\cdots4}_{n-times}}=2\sqrt{36\underbrace{11\cdots1}_{(n-2)-t‌​imes}}$$ – Quixotic Jul 14 '12 at 1:37
I changed the TeX code from {}_{n-times} to {}_{n\text{ times}, so that instead of $1\underbrace{4\cdots4}_{n-times}$ we see $1\underbrace{4\cdots4}_{n\text{ times}}$. The hyphen looked like a minus sign (longer than a hyphen) since it was in math mode, and the "times" got italicized and needed something to artificially separate it from the $n$, since it was in math mode. – Michael Hardy Jul 14 '12 at 1:47

## 2 Answers

For $n \geq 4$ your number is equal to $4444$ modulo $10000$, and in particular modulo $16$. If it were a square, then $4444$ would be a square modulo $16$, implying $1111$ is a square modulo $4$. But $1111=3$ mod $4$, contradiction.

-

Hint: the square root must end in $2$ or $8$ (except for $1$-do you permit no $4$'s?). You can see this by what digit squares end in $4$. You can extend this argument digit by digit, which will terminate by saying that some length of string of $4$'s can't be the end of a square. Then there won't be many possibilities to check.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 27, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9218055009841919, "perplexity_flag": "middle"}