Welcome to My New Blog

Welcome!

This is the very first post on my blog. I’ve built this site using Astro, a modern web framework that makes building fast websites easy.

Why Astro?

Astro is great because:

  • It ships zero JavaScript by default.
  • It has a great developer experience.
  • It’s highly extensible.

C++ Example

Here’s a small C++ “Hello World” you can try locally:

#include <iostream>

int main() {
	std::cout << "Hello, world!\n";
	return 0;
}

Compile and run:

g++ -std=c++17 hello.cpp -o hello
./hello

Stay tuned for more updates!

Arithmetic Progression (AP)

An arithmetic progression is a sequence where each term differs from the previous by a constant dd, called the common difference.

The nn-th term is:

an=a1+(n1)da_n = a_1 + (n - 1)d

The sum of the first nn terms is:

Sn=n2(2a1+(n1)d)=n2(a1+an)S_n = \frac{n}{2}\bigl(2a_1 + (n-1)d\bigr) = \frac{n}{2}(a_1 + a_n)

For example, the AP 2,5,8,11,2, 5, 8, 11, \ldots has a1=2a_1 = 2 and d=3d = 3, so its 10th term is a10=2+9×3=29a_{10} = 2 + 9 \times 3 = 29 and the sum of the first 10 terms is S10=102(2+29)=155S_{10} = \frac{10}{2}(2 + 29) = 155.