Problem 52849. Easy Sequences 34: Modified Pascal's Triangle
Consider the integer triangle below:
It follows the same rule as Pascal's Triangle, except that instead of affixing 1's at the sides of each row, the row number minus 1, is affixed (on first row 0 is affixed; at row 2, 1 is affixed on each side, etc.). Any inner number, as in Pascal's Triangle, is the sum of the left and right numbers on its previous row.
Given a number n find
, which is the sum of the n-th row. Hence,
and
.
We could be getting large numbers here, therefore please concatenate the total number of digits with the last 3 digits of
and output a single concatenated integer. For example the
, hence the output should be
.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
Return the 3n+1 sequence for n
8477 Solvers
-
1338 Solvers
-
514 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
554 Solvers
-
Pseudo Square Root (Inspired by Project Euler 266)
59 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!