List of Symbols Symbol Meaning Page Z set of integers (3) x ∈ S x belongs to set S (3) x /∈ S x does not belong to set S (3) Z+ set of positive integers (3) N set of positive integers (3) W set of whole numbers (4) a < b a is less than b (4) a > b a is greater than b (4) a ≤ b a < b or a = b (5) a ≥ b a > b or a = b (5) min{x,y} the minimum of x and y (5) max{x,y} the maximum of x and y (5) |x| the absolute value of x (5) ⌊x⌋ the floor of the real number x (6) ⌈x⌉ the ceiling of the real number x (6) i=m � i=k ai = m� i=k ai = m� k ai ak + ak+1 + ··· + am (9) � i∈I ai the sum of the values of ai as i runs over the various values in I (11) � P aij the sum of the values of aij, where i and j satisfy properties P (11) i=m � i=k ai = m� i=k ai = m� k ai akak+1 ···am (13) n! n factorial (13) �n r � binomial coefficient (33) tn triangular number (40) sn square number (44) pn pentagonal number (46) hn hexagonal number (48) Tn tetrahedral number (49) Sn square pyramidal number (50) Pn pentagonal pyramidal number (51) Hn hexagonal pyramidal number (51) a div b the quotient when a is divided by b (71) a mod b the remainder when a is divided by b (71) Symbol Meaning Page a|b a is a factor of b (74) a ∤ b a is not a factor of b (74) |A| the number of elements in set A (76) A ∪ B the union of sets A and B (76) A ∩ B the intersection of sets A and B (76) A′ the complement of set A (76) N = (akak−1 ...a1a0)b base-b representation of N (83) Rn repunit with n ones (96) π(x) the number of primes ≤ x (110) Fn the nth Fibonacci number (129) Ln the nth Lucas number (136) |A| the determinant of matrix A (138) fn the nth Fermat number (139) (a,b) the greatest common factor of a and b (155) (a1,a2,...,an) the greatest common factor of a1,a2,..., and an (162) pa ∥ n pa exactly divides n (183) [a,b] the least common multiple of a and b (184) [a1,a2,...,an] the least common multiple of a1,a2,..., and an (187) a ≡ b (mod m) a is congruent to b modulo m (212) a ̸≡ b (mod m) a is not congruent to b modulo m (212) [r] the congruence class represented by r (216) a−1 an inverse of a modulo m (234) ρ(n) the digital root of n (291) In the identity matrix of order n (316) n# the product of primes ≤ n (325) ϕ(n) Euler’s phi function (342) τ(n) the number of positive factors of n (365) σ(n) the sum of the positive factors of n (366) Mp Mersenne number 2p − 1 (381) μ(n) Möbius function (398) λ(n) Liouville function (405) ordm a the order of a modulo m (456) ψ(d) the number of incongruent residues of order d modulo p (470) indα a the index of a to the base α (483) (a/p) Legendre symbol (501) (a/m) Jacobi symbol (527) (a/n) Kronecker symbol (549) Elementary Number Theory with Applications Second Edition Elementary Number Theory with Applications Second Edition Thomas Koshy AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Academic Press is an imprint of Elsevier Academic Press is an imprint of Elsevier 30 Corporate Drive, Suite 400, Burlington, MA 01803, USA 525 B Street, Suite 1900, San Diego, California 92101-4495, USA 84 Theobald’s Road, London WC1X 8RR, UK This book is printed on acid-free paper. ⃝ ∞ Copyright © 2007, Elsevier Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the publisher. Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, E-mail: