Skip to content
m·amathatlas
ExploreAboutOpen problemsCited authorsMy libraryFeedback
Sign in
FRENES
Loading views…Recent views only, across all languages. Vercel history is unavailable for this page. Repeat visits in the same tab are grouped for 30 minutes.
ShareLinkedInXFacebookWhatsApp
← All open problems
Unanswered question

Unreachable middle square

Number theory

Imported on November 28, 2026

The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.

Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.

Problem statement

For positive kkk, define the function HkH_kHk​ over the integer interval [0…22k)[0\dots2^{2k})[0…22k) with Hk(n)  =  ⌊n22k⌋ mod 22kH_k(n)\;=\;\left\lfloor{n^2\over2^k}\right\rfloor\bmod 2^{2k}Hk​(n)=⌊2kn2​⌋mod22k that is, keeping the middle 2k2k2k bits of the 4k4k4k-bit square of 2k2k2k-bit nnn. See Donald Knuth's TAOCP, chapter three (at start of volume 2) for references about use of middle square as a building block in pseudo-random number generators.

For large kkk, e.g. 646464 or 128128128, can we exhibit h∈[0,22k)h\in[0,2^{2k})h∈[0,22k) demonstrably reached by no H(n)H(n)H(n)?

If n<2k/2n<2^{k/2}n<2k/2, then Hk(n)=0H_k(n)=0Hk​(n)=0. By a counting argument, it follows that several hhh in [0…22k)[0\dots2^{2k})[0…22k) are reached by no Hk(n)H_k(n)Hk​(n).

Numerical experiments show that such unreachable values are relatively dense just below 22k2^{2k}22k (more than they are just above 000).

  k (dec)       Six highest unreachable values (hex)
     1            3            1
     2            F            D            B            7            5            3
     3           3F           3B           39           36           35           31
     4           FD           FC           FB           F7           F5           F3
     5          3FB          3F9          3F7          3F6          3F3          3F1
     6          FFF          FF8          FF7          FF3          FF2          FEF
     7         3FFF         3FFD         3FFB         3FFA         3FF9         3FF6
     8         FFFF         FFFD         FFFC         FFF5         FFF4         FFF1
     9        3FFFF        3FFFC        3FFFA        3FFF8        3FFF7        3FFF3
    10        FFFFD        FFFF9        FFFF8        FFFF6        FFFF5        FFFF1
    11       3FFFF9       3FFFF7       3FFFF6       3FFFF3       3FFFEF       3FFFED
    12       FFFFFD       FFFFFB       FFFFF7       FFFFF6       FFFFF4       FFFFF2
    13      3FFFFEF      3FFFFEE      3FFFFED      3FFFFE8      3FFFFE5      3FFFFE3
    14      FFFFFFD      FFFFFFB      FFFFFF5      FFFFFF4      FFFFFEF      FFFFFEA
    15     3FFFFFFF     3FFFFFFD     3FFFFFFA     3FFFFFF6     3FFFFFF4     3FFFFFF1
    16     FFFFFFFD     FFFFFFFC     FFFFFFFA     FFFFFFF9     FFFFFFF8     FFFFFFF7
    17    3FFFFFFFD    3FFFFFFF8    3FFFFFFF7    3FFFFFFEF    3FFFFFFED    3FFFFFFEC
    18    FFFFFFFFF    FFFFFFFFB    FFFFFFFFA    FFFFFFFF7    FFFFFFFF4    FFFFFFFEC

Note: This is the unsolved portion of an old question on crypto-SE. A simplified mathoverflow question asking if H64(n)H_{64}(n)H64​(n) can reach 2128−12^{128}-12128−1 was answered in the affirmative.

Statement and context adapted from MathOverflow · fgrieu

CC BY-SA 4.0 · Formatting adapted; mathematical formulas preserved · Source history

Topics : nt.number-theory

Authors listed by the source : fgrieu

Sources and original status

  • MathOverflow Status in source : unanswered at collection

Last activity on the question : March 14, 2022

Coverage, sources and method

This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.

This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.

Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.

Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.

Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.

OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.

Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.

Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.

  • Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
  • Erdős Problems (teorth) · 622 · Apache-2.0
  • Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
  • OEIS · 18,857 · CC BY-SA 4.0
  • MathOverflow · 19,035 · CC BY-SA (version on each entry)
  • Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)
Report a development or correction
mathatlas

An independent atlas to understand, read, and question research.

The papers present claimed results at different stages of verification.
NewsletterShare feedbackAbout Data and privacy
Created by Sonny Mupfuni