Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
S - is the sum of a square's sides, than that sum (S) is multiplied by 4 and as a result you get a perimeter of squares.
So S(n) - is a length of nth square side.
And you need to write a function that will calculte 4 * S = 4 * ( S(0) + S(1) + .... + S(n) )
An IntStream. See https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html#chars--