My name is Michail and throughout my studies, I have gained hands-on experience working in laboratories, ensuring product quality and adhering to industry standards.
While my academic background, I have a strong passion for programming and technology. Computers and the internet have always been a big part of my life, and I am deeply motivated to create something of my own in the digital world. My curiosity drives me to explore new technologies, programming languages, libraries, and frameworks, as their vast possibilities align perfectly with my desire for continuous learning.
One of my key strengths is my versatility—I immerse myself deeply in different fields and always strive to understand new concepts thoroughly. I am highly goal-oriented, self-motivated, and eager to improve my skills. Even though my professional experience in tech is still growing, my dedication to mastering new knowledge makes me confident in my ability to succeed in this dynamic field.
Problem 12: Highly divisible triangular number The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, … Let us list the factors of the first seven triangle numbers:
1: 1
3: 1, 3
6: 1, 2, 3, 6
10: 1, 2, 5, 10
15: 1, 3, 5, 15
21: 1, 3, 7, 21
28: 1, 2, 4, 7, 14, 28
We can see that 28 is the first triangle number to have over five divisors.
What is the value of the first triangle number to have over n divisors?
function* genTriangleNum() {
let k = 1;
while (true) {
yield (k * (k + 1) / 2)
k++
}
}
function checkDivisors(num) {
let count = 0
for (let i = 1; i <= Math.sqrt(num); i++) {
if (num % i === 0) {
count += (i * i === num) ? 1 : 2
}
}
return count
}
function divisibleTriangleNumber(n) {
const gen = genTriangleNum()
let triangle
while (true) {
triangle = gen.next().value
if (checkDivisors(triangle) > n) {
return triangle
}
}
}
Although I am just beginning my journey in IT, I have actively developed my programming skills through hands-on projects and self-study. Below are some of the key initiatives I have worked on: