English

On the binary digits of $n$ and $n^2$

Number Theory 2022-10-13 v2 Combinatorics

Abstract

Let s(n)s(n) denote the sum of digits in the binary expansion of the integer nn. Hare, Laishram and Stoll (2011) studied the number of odd integers such that s(n)=s(n2)=ks(n)=s(n^2)=k, for a given integer k1k\geq 1. The remaining cases that could not be treated by theses authors were k{9,10,11,14,15}k\in\{9,10,11,14,15\}. In this paper we show that there is only a finite number of solutions for k{9,10,11}k\in\{9,10,11\} and comment on the difficulties to settle the two remaining cases k{14,15}k\in\{14,15\}. A related problem is to study the solutions of s(n2)=4s(n^2)=4 for odd integers. Bennett, Bugeaud and Mignotte (2012) proved that there are only finitely many solutions and conjectured that n=13,15,47,111n=13,15,47,111 are the only solutions. In this paper, we give an algorithm to find all solutions with fixed sum of digits value, supporting this conjecture, as well as show related results for s(n2)=5s(n^2)=5.

Keywords

Cite

@article{arxiv.2203.05451,
  title  = {On the binary digits of $n$ and $n^2$},
  author = {Karam Aloui and Damien Jamet and Hajime Kaneko and Steffen Kopecki and Pierre Popoli and Thomas Stoll},
  journal= {arXiv preprint arXiv:2203.05451},
  year   = {2022}
}

Comments

28 pages

R2 v1 2026-06-24T10:08:50.728Z