Computations with Sage involving integers
  
  
  
 
| Sage Command | 
Result | 
Description | 
 
 
 3* (2^10 -1) 
 | 
3069
 | 
 3 times (2 to the  10 minus 1)
 | 
 factorial(10) 
 | 
3628800
 | 
factorial 10
 | 
  1055 % 11   | 
10 | 
 remainder of the Euclidean division of  1055 by 11 | 
1055//11 | 
 95  | 
quotient of the Euclidean division of   1055 by 11  | 
 factor(60984)  | 
2^3 * 3^2 * 7 * 11^2 | 
 factorisation of 60984  | 
divisors(30) | 
[1, 2, 3, 5, 6, 10, 15, 30] | 
divisors of 30
 | 
 
number_of_divisors(9240) | 
64 | 
number of divisors  of  9240 | 
 
euler_phi(72) | 
24 | 
number of positive integers up to 72 that are relatively prime to 72 |  
 prime_divisors(168) | 
[2, 3, 7] | 
prime divisors of 168 | 
valuation(18144,3) | 
4 | 
exponent of 3 in the factorisation of 18144 | 
next_prime(50) | 
53 | 
smallest prime number greater than  50 | 
previous_prime(168)  | 
167 | 
greatest prime number smaller than 168 | 
 next_prime_power(67)   | 
71 | 
smallest prime power greater than 67 | 
previous_prime_power(37) | 
32 | 
greatest prime power smaller than 37 | 
prime_pi(100) | 
25 | 
number of primes smaller than  100 | 
 2047 in Primes()  | 
 False  | 
 2047 is not a prime  | 
 
 8191 in Primes()  | 
 True  | 
 8191 is a prime  | 
 
 Primes().unrank(10)  | 
 31  | 
 eleventh prime  | 
 
 Prime_range(13,23)  | 
 [13,17,19]  | 
  liste of primes in the interval [13,23)  | 
 
gcd(114,138) |  
6 | 
gcd of 114 and 138 | 
lcm(114,138) | 
2622 | 
lcm of 114 and 138 | 
xgcd(114,138) | 
 (6, -6, 5)  | 
 gcd and  Bézout coefficients of    (114,138)  | 
binomial(27,5) | 
80730 | 
number of subsets of cardinality  5 in a set of cardinality  27  | 
sigma(30,4) | 
872644  | 
sum of the fourth powers of the divisors of  30 |