[{"content":"The following python code produces the Lorenz Attractor, which is a classic example of the butterfly effect. The governing set of differential equations are given by $$ \\frac{dx}{dt} = \\sigma(y-x) $$ $$ \\frac{dy}{dt} = x(\\rho - z) - y $$ $$ \\frac{dz}{dt} = xy - \\beta z $$ The code and the outcome obtained is given below\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 import numpy as np import matplotlib.pyplot as plit from mpl_toolkits.mplot3d import Axes3D sigma=10.0 rho=28.0 beta=8.0/3.0 dt=0.01 steps=10000 xs=np.empty(steps+1) ys=np.empty(steps+1) zs=np.empty(steps+1) xs[0], ys[0], xs[0] = (0.0,1.0,1.05) for i in range(steps): x=xs[i] y=ys[i] z=zs[i] xs[i+1]=x+sigma*(y-x)*dt ys[i+1]=y+(x*(rho-z)-y)*dt zs[i+1]=z+(x*y-beta*z)*dt fig=plit.figure(figsize=(10,7)) ax=fig.add_subplot(111,projection=\u0026#39;3d\u0026#39;) ax.plot(xs,ys,zs,lw=0.5,color=\u0026#34;darkblue\u0026#34;) ax.set_title(\u0026#34;Lorenz Attractor (Butterfly Effect)\u0026#34;,fontsize=14) ax.set_xlabel(\u0026#34;X Axis\u0026#34;) ax.set_ylabel(\u0026#34;Y Axis\u0026#34;) ax.set_zlabel(\u0026#34;Z Axis\u0026#34;) plit.show() ","date":"13 May 2026","externalUrl":null,"permalink":"/codes/code-1/","section":"Codes","summary":"","title":"Python Code for Lorenz Attractor","type":"codes"},{"content":" When Machines Start Guessing Smartly # When Netflix recommends a movie, when your phone predicts the next word you type, or when YouTube seems to know exactly what you want to watch next, it can almost feel like magic.\nBut here’s the truth:\nAI isn’t “thinking” like a human.\nIt is making very smart guesses using probability.\nAI Doesn’t Know — It Predicts # At its core, artificial intelligence does not deal in certainty.\nIt deals in likelihoods.\nEvery time an AI system makes a decision, it is essentially answering questions like:\nWhat is the probability this email is spam? What is the probability the user will click this video? What word is most likely to come next in this sentence? Classification: Decisions Based on Probability # One of the most common tasks in machine learning is classification, i.e., placing things into categories.\nConsider spam detection as an example.\nAn AI model might examine an email and conclude:\n\\(95\\%\\) probability \\(\\rightarrow\\) spam \\(5\\%\\) probability \\(\\rightarrow\\) not spam It does not know for certain.\nIt simply chooses the option with the higher probability.\nThis idea powers everything from fraud detection systems to medical diagnosis tools.\nLearning from Data: Where Do These Probabilities Come From? # So how does AI learn these probabilities?\nThe answer is simple: Data\nDuring training, machine learning models analyze massive amounts of information and begin detecting patterns such as:\nPeople who watched one video often watch another Certain words frequently appear together Some pixel patterns are more likely to represent a cat than a dog Over time, the model develops an internal statistical rule:\n“When I observe this pattern, this outcome is highly likely.”\nThis is not memorization.\nIt is the process of learning probability distributions from data.\nUpdating Beliefs: The Power of Context # One of the most powerful ideas behind AI is that probabilities change when new information becomes available.\nFor example:\nThe chance of rain might initially be \\(30\\%\\) Given dark clouds, it may rise to \\(80\\%\\) AI systems work in the same way.\nPredictions are continuously updated based on:\nYour past searches Your watch history Your current behavior This constant updating is what makes modern recommendation systems feel personalized.\nWhy Randomness Matters # Interestingly, AI systems do not always choose the single most probable option.\nSometimes they intentionally introduce randomness.\nWhy?\nBecause always selecting the highest-probability choice can make systems:\nRepetitive Boring Too predictable By occasionally exploring less likely options, AI systems become:\nMore creative in text generation More diverse in recommendations More human-like in behavior This balance between probability and randomness is extremely important.\nReal-World Examples # Probability-driven AI appears almost everywhere:\nStreaming platforms recommend what you might enjoy next Search engines rank the most relevant results Voice assistants interpret what you intended to say Self-driving systems estimate the likelihood of obstacles Behind all of these applications lies the same central principle:\n“Choose the action with the highest chance of success.”\nThe Central Idea # A powerful way to think about artificial intelligence is:\n“AI does not understand the world the way humans do. It builds a mathematical model of what is likely to happen.”\nIt is not reasoning with meaning.\nIt is reasoning with probability.\nConclusion # In the end, artificial intelligence is not magic.\nIt is not intuition.\nIt is not consciousness.\nIt is mathematics quietly operating in the background, calculating what is most likely to happen next.\nAnd somehow, that is enough to make machines seem almost human.\n","date":"18 March 2026","externalUrl":null,"permalink":"/posts/blog-3/","section":"Posts","summary":"","title":"AI, Machine Learning and Probability","type":"posts"},{"content":" What are Prime Numbers? # Most of us would answer: a prime number is a number divisible only by \\(1\\) and itself. True — but there is much more hidden inside prime numbers than this simple definition suggests.\nHave we ever wondered whether prime numbers can be written as a sum of two squares?\nWhich prime numbers can be written in the form\n$$ x^2+y^2 $$A quick exploration of small primes reveals that numbers such as \\(2\\), \\(5\\), and \\(13\\) can indeed be expressed in this form, whereas \\(3\\), \\(7\\), and \\(11\\) cannot.\nThis naturally leads to a deeper question:\nIs there a general rule?\nIndeed, there is.\nA prime number \\(p\\) can be expressed as\n$$ x^2+y^2 $$if and only if\n$$ p=2 \\quad\\text{or}\\quad p\\equiv1\\pmod4 $$This elegant criterion invites an even broader question:\nFor a fixed integer \\(n\\), which prime numbers can be written in the form\n$$ x^2+n y^2 $$This leads us to a beautiful and classical result in number theory known as Fermat’s Christmas Theorem.\nFermat’s Christmas Theorem # Statement # An odd prime number \\(p\\) can be written in the form\n$$ p=a^2+b^2 $$for some integers \\(a,b\\), if and only if\n$$ p\\equiv1\\pmod4 $$Thus, primes of the form\n$$ 4k+1 $$are exactly the primes that can be represented as the sum of two squares.\nWhy is it called the “Christmas Theorem”? # The theorem was first stated by \\[ \\text{Pierre de Fermat} \\] in a letter written in \\(1640\\), where he mentioned that he had discovered the proof on Christmas Day.\nBecause of this historical anecdote, the result became known as Fermat’s Christmas Theorem.\nProof # Consider the set of complex numbers of the form\n$$ a+bi $$where \\(a\\) and \\(b\\) are integers.\nThese numbers are called Gaussian integers.\nFor any Gaussian integer\n$$ z=a+ib $$define its norm by\n$$ N(z)=a^2+b^2 $$An important property of the norm is:\n$$ N(z_1z_2)=N(z_1)N(z_2) $$Thus, the norm of a product equals the product of the norms.\nNow suppose \\(p\\) is a prime number satisfying\n$$ p\\equiv1\\pmod4 $$From elementary number theory, we know that for such primes there exists an integer \\(x\\) such that\n$$ x^2\\equiv-1\\pmod p $$Equivalently,\n$$ x^2+1\\equiv0\\pmod p $$Hence \\(p\\) divides \\(x^2+1\\).\nNow observe that\n$$ x^2+1=(x+i)(x-i) $$inside the Gaussian integers.\nThus \\(p\\) divides the product\n$$ (x+i)(x-i) $$In the Gaussian integers, a prime satisfying\n$$ p\\equiv1\\pmod4 $$is no longer prime.\nTherefore \\(p\\) must factorize as\n$$ p=(a+bi)(a-bi) $$for some integers \\(a,b\\).\nNow take norms on both sides:\n$$ N(p)=N(a+bi)N(a-bi) $$But\n$$ N(p)=p^2 $$and\n$$ N(a+bi)=a^2+b^2 $$Similarly,\n$$ N(a-bi)=a^2+b^2 $$Therefore,\n$$ p^2=(a^2+b^2)^2 $$Taking square roots gives\n$$ p=a^2+b^2 $$Hence every prime number \\(p\\) satisfying\n$$ p\\equiv1\\pmod4 $$can be written as the sum of two squares.\n\\[ \\boxed{\\text{Q.E.D.}} \\]","date":"10 March 2026","externalUrl":null,"permalink":"/posts/blog-2/","section":"Posts","summary":"","title":"Story of Primes","type":"posts"},{"content":" Introduction # The following problem appeared in the IOQM 2023 paper. Let $\\alpha,\\beta$ be positive integers such that $$ \\frac{16}{37}\u003c\\frac{\\alpha}{\\beta}\u003c\\frac{7}{6} $$ Find the smallest possible value of $\\beta$. There is a brute force solution for this, where we either cross-multiply by $\\beta$ to get $$ \\frac{16}{37}\\beta\u003c\\alpha\u003c\\frac{7}{6}\\beta $$ and then take cases by increasing the value of $\\beta$ from $1,2,3,\\dots$ till we get a possible integral value of $\\alpha$ satisfying the above inequality. Rather than resorting to computational brute force, we can employ elementary number theory to derive an optimal solution.\nAnalysis of the Problem from a Number Theory Perspective # We cross-multiply by $\\beta$: $$ \\frac{16\\beta}{37}\u003c\\alpha\u003c\\frac{7\\beta}{6} $$ Now eliminate fractions: $$ 16^2\\beta\u003c37\\cdot16\\alpha\u003c7\\cdot37\\beta $$ $$ 256\\beta\u003c592\\alpha\u003c259\\beta $$ Hence, $$ 592\\alpha=256\\beta+k $$ where $$ 1\\le k\\le 3\\beta-1 $$ Since $$ \\gcd(592,256)=16 $$ we obtain $$ 16(37\\alpha-16\\beta)=k $$ Let $$ k=16p $$ Then $$ 37\\alpha-16\\beta=p $$ where $$ 1\\le p\\le \\frac{3\\beta-1}{16} $$ Now since $$ \\gcd(37,16)=1 $$ Bezout\u0026rsquo;s theorem guarantees integers $x,y$ such that $$ 37x-16y=1 $$ Using Euclidean algorithm: $$ 37=16\\cdot2+5 $$ $$ 16=5\\cdot3+1 $$ Thus, $$ 1=16-5\\cdot3 $$ $$ =16-(37-16\\cdot2)\\cdot3 $$ $$ =16-37\\cdot3+16\\cdot6 $$ $$ =16\\cdot7-37\\cdot3 $$ Hence, $$ 37(-3)+16(7)=1 $$ Now suppose $x,y$ is another solution. Then $$ 37x+16y=1 $$ Subtracting the known solution: $$ 37(x+3)=16(7-y) $$ Since $$ \\gcd(37,16)=1 $$ we get $$ x+3=16a $$ and $$ 7-y=37a $$ for some $$ a\\in\\mathbb Z $$ Hence the general solution becomes $$ x=16a-3 $$ $$ y=7-37a $$ Therefore, $$ 37(16a-3)+16(7-37a)=1 $$ Multiplying by $p$: $$ 37(16a-3)p+16(7-37a)p=p $$ Now let $x,y$ satisfy $$ 37x+16y=p $$ Then $$ 37\\left[x-(16a-3)p\\right] 16\\left[(7-37a)p-y\\right] $$ Again using coprimality: $$ x-(16a-3)p=16b $$ $$ (7-37a)p-y=37b $$ Thus, $$ x=16(ap+b)-3p $$ $$ y=7p-37(ap+b) $$ Now compare with $$ 37\\alpha-16\\beta=p $$ Hence, $$ \\alpha=16(ap+b)-3p $$ $$ \\beta=37(ap+b)-7p $$ where $$ 1\\le p\\le \\frac{3\\beta-1}{16} $$ Take $$ a=0 $$ Then $$ \\beta=37b-7p $$ Substitute into the inequality: $$ p\\le \\frac{3(37b-7p)-1}{16} $$ $$ 16p\\le111b-21p-1 $$ $$ 37p\\le111b-1 $$ $$ p\\le3b-\\frac1{37} $$ Thus, $$ p\\le3b-1 $$ Therefore, $$ \\beta=37b-7p \\ge37b-7(3b-1) $$ $$ =16b+7 $$ Minimum occurs at $$ b=1 $$ Hence, $$ \\beta_{\\min}=16(1)+7=23 $$ Now verify positivity of $\\alpha$: $$ \\alpha=16(1)-3(2)=16-6=10\u003e0 $$ Therefore the smallest possible value is $$ \\boxed{23} $$","date":"27 February 2026","externalUrl":null,"permalink":"/posts/blog-1/","section":"Posts","summary":"","title":"Problem on Inequalities and Number Theory","type":"posts"},{"content":"","date":"13 May 2026","externalUrl":null,"permalink":"/codes/","section":"Codes","summary":"","title":"Codes","type":"codes"},{"content":"","date":"13 May 2026","externalUrl":null,"permalink":"/","section":"MATHECIS BY SHREE","summary":"","title":"MATHECIS BY SHREE","type":"page"},{"content":"","date":"18 March 2026","externalUrl":null,"permalink":"/posts/","section":"Posts","summary":"","title":"Posts","type":"posts"},{"content":"Hi, Shreyy here!!!\nI am a mathematics enthusiast, learner, and content creator passionate about making mathematics more intuitive, creative, and enjoyable for everyone. Through my platform, Mathecis by Shrey, I share mathematical ideas, problem-solving techniques, visual insights, and educational content designed to spark curiosity and encourage deeper thinking.\nI believe mathematics is more than formulas and calculations — it is a way of understanding patterns, logic, and the beauty hidden within the world around us. My goal is to make mathematical concepts feel approachable and inspiring for students, learners, and anyone who enjoys exploring ideas.\nThis space is a reflection of my journey with mathematics — a place to learn, share, and grow together.\n","externalUrl":null,"permalink":"/about/","section":"About Me","summary":"","title":"About Me","type":"about"},{"content":"","externalUrl":null,"permalink":"/authors/","section":"Authors","summary":"","title":"Authors","type":"authors"},{"content":"","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":"","externalUrl":null,"permalink":"/series/","section":"Series","summary":"","title":"Series","type":"series"},{"content":"","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"}]