1
((:FILES ; non-empty list of filenames, generated from Unix command "ls -1R"
9
(:TITLE "Solving TRIANGLE = SQUARE")
10
(:AUTHOR/S "John R. Cowles"
12
(:KEYWORDS "triangular numbers"
18
"For positive integer n, the triangular number, Delta_n, is defined by
19
Delta_n = 1 + 2 + ... + (n-1) + n
21
The first 6 triangular numbers are Delta_1 = 1, Delta_2 = 3,
22
Delta_3 = 6, Delta_4 = 10, Delta_5 = 15, and Delta_6 = 21.
24
Problem. Find triangular numbers that are also squares.
25
That is, find positive integers, n and k, such that
28
n * (n + 1) = 2 * k^2.
30
Clearly Delta_1 = 1 is a square. Are there other square triangular numbers?
31
Are there infinitely many square triangular numbers? These questions are
32
answered below and the answers are formally verfied using ACL2.
34
Define functions that compute floor of log base 2 and
35
ceiling log base 2 for nonnegative integers n.
37
Show these functions are correct.
38
Show these functions use logarithmic number, in input n,
39
of arithmetic operations to compute their results.")
40
(:PERMISSION ; author/s permission for distribution and copying:
41
"ACL2 book Solving TRIANGLE = SQUARE
42
Copyright (C) 2008 John R. Cowles and Ruben Gamboa, University of Wyoming
44
This book is free software; you can redistribute it and/or
45
modify it under the terms of the GNU General Public License
46
as published by the Free Software Foundation; either version 2
47
of the License, or (at your option) any later version.
49
This book is distributed in the hope that it will be useful,
50
but WITHOUT ANY WARRANTY; without even the implied warranty of
51
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52
GNU General Public License for more details.
54
You should have received a copy of the GNU General Public License
55
along with this book; if not, write to the Free Software
56
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
b'\\ No newline at end of file'