HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Notes
  2. /Factorials, Irrational Numbers, Digits and the Floor Function: Quick Revision
Mathematics

Factorials, Irrational Numbers, Digits and the Floor Function: Quick Revision

A brief note on the floor function, Legendre's formula, irrational numbers, decimals, bases and the remainders of squares and cubes. It lists the usual slips and gives questions to check yourself.

StemPy LabWritten by StemPy Lab
Log in to save

A brief note on Factorials, Irrational Numbers, Digits and the Floor Function. Try each question before you open its answer.

The key facts

  • Floor: ⌊x⌋≤x<⌊x⌋+1\lfloor x \rfloor \le x < \lfloor x \rfloor + 1⌊x⌋≤x<⌊x⌋+1; ⌊−2.5⌋=−3\lfloor -2.5 \rfloor = -3⌊−2.5⌋=−3.
  • Multiples: from 111 to nnn there are ⌊n/d⌋\lfloor n/d \rfloor⌊n/d⌋ multiples of ddd.
  • Legendre: the exponent of ppp in n!n!n! is ∑k⌊n/pk⌋\sum_k \lfloor n/p^k \rfloor∑k​⌊n/pk⌋.
  • Zeros of n!n!n!: the exponent of 555.
  • Decimals: p/qp/qp/q in lowest terms ends exactly when q=2i5jq = 2^i 5^jq=2i5j; otherwise it repeats.
  • Irrational: n\sqrt{n}n​ unless nnn is a square; log⁡23\log_2 3log2​3; 2+3\sqrt{2} + \sqrt{3}2​+3​.
  • Rational roots: p/qp/qp/q with p∣a0p \mid a_0p∣a0​ and q∣anq \mid a_nq∣an​.
  • Bases: the digits are the remainders of repeated division.
  • Digits of NNN: ⌊log⁡10N⌋+1\lfloor \log_{10} N \rfloor + 1⌊log10​N⌋+1.
  • Squares: last digit 0,1,4,5,6,90, 1, 4, 5, 6, 90,1,4,5,6,9; remainder 0,10, 10,1 on division by 444; 0,1,4,70, 1, 4, 70,1,4,7 on division by 999.
  • Cubes: remainder 0,1,80, 1, 80,1,8 on division by 999.

Practise with new numbers

A program to try

The program counts the zeros of a factorial in two ways, takes the floor of a negative number and writes a number in base 333.

Read it first. Then run it. Do the two counts of zeros agree?

1. Change n = 75 to n = 140. Add the term for 535^353 to the formula. Do they still agree?

Mistakes to avoid

  • The floor of a negative number. Go down, not towards 000.
  • Only one term of Legendre's formula.
  • Testing a fraction for an ending decimal before cancelling.
  • Reading base digits in the wrong order.
  • One remainder test only. Try 444, 888 and 999.

Check yourself

  1. How many zeros end 75!75!75!?
  1. Is 0.6‾0.\overline{6}0.6 rational?
  1. Is 45\sqrt{45}45​ rational?
  1. Write 350350350 in base 333.
  1. Can a square leave remainder 222 on division by 333?

Sources

  • David M. Burton, Elementary Number Theory, Chapter 6, section 6.3.
  • Ivan Niven, Numbers: Rational and Irrational.
← All Notes
← Common Factors, the Euclidean Algorithm and Divisors: Quick RevisionCongruences and the Chinese Remainder Theorem: Quick Revision →
More onNumber Theory

Discussion (0)

Log in to join the discussion.

Loading…

On this page

  1. The key facts
  2. Practise with new numbers
  3. A program to try
  4. Mistakes to avoid
  5. Check yourself
  6. Sources

Goes with the lesson

  1. Digits, bases, squares and cubesFactorials, Irrational Numbers, Digits and the Floor Function

More notes on this topic

Diophantine Equations and Pythagorean Triples: Quick Revision
  • Fermat, Euler and Wilson: Quick Revision
  • Congruences and the Chinese Remainder Theorem: Quick Revision
  • Common Factors, the Euclidean Algorithm and Divisors: Quick Revision
  • Division, Divisibility Rules and Primes: Quick Revision
  • All notes on this topic →