Find a formula for a sequence of the following character strings

54 Views Asked by At

Given strings:

0,

020,

0208020,

0208020180208020,

0208020180208020320208020180208020,

...

I have to write a C++ program that computes the nth string. My problem is to find a rule to get the next string. Maybe i just need a little hint.

Thanks for your help.

1

There are 1 best solutions below

1
On BEST ANSWER

It looks like you're copying the number you have and sticking $2n^2$ in between the copies.