Tag Archives: sagemath

How to use “simplify” and “expand” commands in Sagemath

Posted in Algebra, Programming | Tagged | Leave a comment

Linearization using Tangent Plane

Posted in Calculus | Tagged , | Leave a comment

When is product of first n primes +1 is Prime ?

The classic proof by contradiction proof of infinite number of primes rest on the argument that if primes were infinite than we will have a biggest prime and if we take all the primes and multiply them together and add … Continue reading

Posted in Prime Numbers, Proof | Tagged , | Leave a comment

Caesar Cipher using Sagemath

This is an elementary code to implement caesar cipher. import string #import the string library # This is to encode only small alphabets with no space def caesar(word,shft): a = string.ascii_lowercase #copy all the lowercase letter in the array b=range(1,27) … Continue reading

Posted in Computer Program | Tagged | Leave a comment

Josephus Problem

Josephus Problem is a classic problem in math and the following program is an attempt to capture this # This program is written for Sagemath but it should also work in Python # The objective of the program is to … Continue reading

Posted in Combinatorics, Computer Program, Famous Problem | Tagged | Leave a comment