Vanshika Sood has Published 28 Articles

The Sum of the Fifth Powers of the First n Natural Numbers

Vanshika Sood

Vanshika Sood

Updated on 17-Aug-2023 20:00:47

261 Views

Natural numbers are numbers that start from 1 and include all the positive integers. The following article discusses two possible approaches to compute the sum of the fifth powers of the first n natural numbers. The article discusses the two approaches in detail and compares them with regards to efficiency ... Read More

Pernicious Number

Vanshika Sood

Vanshika Sood

Updated on 17-Aug-2023 19:47:00

93 Views

A number is considered to be pernicious if the number is a positive integer and the number of set bits in its binary expansion are prime. The first pernicious number is 3, as 3 = (11)2. It can be seen that the number of set bits in the binary representation ... Read More

Odious Number

Vanshika Sood

Vanshika Sood

Updated on 17-Aug-2023 19:40:24

152 Views

A number is considered to be an odious number if it has an odd number of 1s in its binary expansion. The first 10 odious numbers are 1, 2, 4, 7, 10, 11, 13, 14, 16, 19, 21. Interestingly, all powers of 2 are odious since they have only 1 ... Read More

Pythagorean Quadruple

Vanshika Sood

Vanshika Sood

Updated on 19-Apr-2023 11:13:12

376 Views

A group of four positive integers (a, b, c, and d) that satisfy the Pythagorean equation are called Pythagorean quadruples. The equation can be written as: a2 + b2 + c2 = d2 , with ‘d’ being the largest value out of the given numbers. In other words, the square ... Read More

Palindromic Selfie Numbers

Vanshika Sood

Vanshika Sood

Updated on 19-Apr-2023 11:08:35

154 Views

A number is considered to be a “Selfie Number” if it can be represented using only its own digits and certain mathematical operations. For example, 936 is a selfie number. $$\mathrm{936\:=\:(\sqrt{9})!^{3} \:+\:6!\:=\:216\:+\:720\:=\:936}$$ Here it can be observed that a series of operations are performed on the digits of the ... Read More

Closest Numbers from a List of Unsorted Integers

Vanshika Sood

Vanshika Sood

Updated on 19-Apr-2023 11:06:15

885 Views

In the following article, we discuss two approaches to find the closest numbers from a list of unsorted integers. Let us first understand what is meant by the term ‘closest numbers’. Closest numbers are the pair(s) of numbers which have the least difference between them. Problem Statement Given a list ... Read More

Delete a Linked List Using Recursion

Vanshika Sood

Vanshika Sood

Updated on 19-Apr-2023 11:04:06

723 Views

Linked List A linked list is a linear data structure in which the elements are stored at non-contiguous memory locations. Each element consists of a node. A node is composed of a data field, which holds the value of the element, and an address field, which points to the location ... Read More

To Check if a Number is a Munchhausen Number

Vanshika Sood

Vanshika Sood

Updated on 19-Apr-2023 11:02:04

344 Views

Munchhausen Numbers are peculiar numbers which possess a unique property. A number is considered to be munchhausen if the sum of the digits of the number, raised to their own power, is equal to the original number. These numbers are uncommon and not many of them are known. If the ... Read More

Advertisements