Elementary Number Theory with Programming
eBook - ePub

Elementary Number Theory with Programming

Marty Lewinter, Jeanine Meyer

Buch teilen
  1. English
  2. ePUB (handyfreundlich)
  3. Über iOS und Android verfügbar
eBook - ePub

Elementary Number Theory with Programming

Marty Lewinter, Jeanine Meyer

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

A highly successful presentation of the fundamental concepts of number theory and computer programming

Bridging an existing gap between mathematics and programming, Elementary Number Theory with Programming provides a unique introduction to elementary number theory with fundamental coverage of computer programming. Written by highly-qualified experts in the fields of computer science and mathematics, the book features accessible coverage for readers with various levels of experience and explores number theory in the context of programming without relying on advanced prerequisite knowledge and concepts in either area.

Elementary Number Theory with Programming features comprehensive coverage of the methodology and applications of the most well-known theorems, problems, and concepts in number theory. Using standard mathematical applications within the programming field, the book presents modular arithmetic and prime decomposition, which are the basis of the public-private key system of cryptography. In addition, the book includes:

  • Numerous examples, exercises, and research challenges in each chapter to encourage readers to work through the discussed concepts and ideas
  • Select solutions to the chapter exercises in an appendix
  • Plentiful sample computer programs to aid comprehension of the presented material for readers who have either never done any programming or need to improve their existing skill set
  • A related website with links to select exercises
  • An Instructor's Solutions Manual available on a companion website

Elementary Number Theory with Programming is a useful textbook for undergraduate and graduate-level students majoring in mathematics or computer science, as well as an excellent supplement for teachers and students who would like to better understand and appreciate number theory and computer programming. The book is also an ideal reference for computer scientists, programmers, and researchers interested in the mathematical applications of programming.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Elementary Number Theory with Programming als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Elementary Number Theory with Programming von Marty Lewinter, Jeanine Meyer im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Mathématiques & Théorie des nombres. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Verlag
Wiley
Jahr
2015
ISBN
9781119062776

1
SPECIAL NUMBERS: TRIANGULAR, OBLONG, PERFECT, DEFICIENT, AND ABUNDANT

We start our introduction to number theory with definitions, properties, and relationships of several categories of numbers.

TRIANGULAR NUMBERS

Triangular numbers are those that can be written as the sum of a consecutive series of (whole) numbers beginning with 1. Thus 6 is triangular because it is the sum of the first three numbers: 6 = 1 + 2 + 3. The first few triangular numbers are 1, 3, 6, 10, 15, 21, 28, 36, 45, and 55. We denote the nth triangular number by tn. Thus t5 = 1 + 2 + 3 + 4 + 5 = 15. More generally,
(1.1)
images
Our first program, calculating a specific triangular number, shows the format of an HTML document. The first line specifies the doctype. The rest is an html element, starting with <html> and ending with </html>. Within the html element is a head element and a body element. In this case, the body element is empty. The head element contains a meta tag specifying the character type (it can be omitted), a title, and a script element. All the action is in the script element.
The code makes use of standard programming constructs such as variables and functions and for-loops (if you don’t understand what these terms are, please consult any beginner book on programming. Shameless plug: go to The Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript, http://www.apress.com/9781430233831).
The specific triangular number we want is specified in the coding by setting the variable n . This is termed hard-coding. The computation is done using a for-loop. The for-loop adds up the values from 1 to n , exactly following Equation 1.1. The built-in method document.write writes out the result.
The challenge in Exercise 1 is to compare coding using Equation 1.1 versus Equation 1.2. The challenge is that computers are very fast. I use the built-in Date function with the method getTime to get the number of milliseconds from a base date at the start and after the computation. It turns out that computing the millionth triangular number takes 3 ms! You can experiment with different values. Using the formula given in Equation 1.2 would be much, much faster. Give it a try.
The nth triangular number is given by the formula:
(1.2)
images

Example:

pg02-01

Example:

Write 6 + 7 + 8 + 9 + 10 + 11 as the difference of two triangular numbers. We observe that 6 + 7 + 8 + 9 + 10 + 11 = (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11) − (1 + 2 + 3 + 4 + 5), which is t11t5.

Example:

Generalize the previous example to ...

Inhaltsverzeichnis