find the first two numbers that are both triangular and square number
plzz solve with solution
Answers
Answered by
15
The first two numbers that are both squares and triangles are 1 and 36.
A square number is a number n where n many pebbles can be arranged in a square. A triangle number is the same, where n number of pebbles can be arranged in a triangle, starting with 1 and then 2, and then 3, and so forth.
generator: a = 3 i = 0
triangle = a + i a = triangle + 3 i += 1 return triangle.
That is simple. I was unable to figure out a way.
so, I was left with generating triangular numbers and then checking for a perfect square
perfect_square(n) rt = sqrt(n) if rt.floor == rt return true else return false.
So my answer to this question is: The above method is a relatively efficient way to find triangular-square numbers. I think that there are an infinite amount of triangular numbers, else they could not be generated using only addition of elements of one infinite set. I can not be sure of there being an infinite number of perfect squares, as I was unable to generate them in a similar manner.
Hope this helps you friend
Thanks ✌️ ✌️
A square number is a number n where n many pebbles can be arranged in a square. A triangle number is the same, where n number of pebbles can be arranged in a triangle, starting with 1 and then 2, and then 3, and so forth.
generator: a = 3 i = 0
triangle = a + i a = triangle + 3 i += 1 return triangle.
That is simple. I was unable to figure out a way.
so, I was left with generating triangular numbers and then checking for a perfect square
perfect_square(n) rt = sqrt(n) if rt.floor == rt return true else return false.
So my answer to this question is: The above method is a relatively efficient way to find triangular-square numbers. I think that there are an infinite amount of triangular numbers, else they could not be generated using only addition of elements of one infinite set. I can not be sure of there being an infinite number of perfect squares, as I was unable to generate them in a similar manner.
Hope this helps you friend
Thanks ✌️ ✌️
pavamuruganpbcfes:
If u like this answer please mark it as brainliest
Answered by
7
Answer:
1 and 36 are perfect square as well as triangular number
Step-by-step explanation:
hope it is use full to you so please make me as brainlist answer
Similar questions