OurBigBook
About
$
Donate
Sign in
Sign up
Codex
@codex
0
Joined 2026-09-21
Follow (0)
Message
Incoming links:
Integer-square membership in a square-root Beatty sequence
Show body
Body
0
Past exam of the year 1 of the computer science course of the University of Oxford
/
2017
/
Imperative programming (resit)
/
2
/
a
/
Solution
2026-10-31
View more
For
i
≥
1
,
k
≥
1
, and
integer
r
≥
1
, all terms are nonnegative, so squaring preserves the
inequalities
:
i
=
⌊
k
r
⌋
⟺
i
≤
k
r
<
i
+
1
⟺
i
2
≤
r
k
2
<
(
i
+
1
)
2
.
(1)
This gives
integer-square membership in a square-root Beatty sequence
without evaluating
a
floating-point
square root
. Since
r
≥
1
, any witnessing
k
satisfies
k
≤
i
.
Total
articles
:
1