You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output requires the sequence of Demlo numbers. For n<=9, the squares of the first few repunits are precisely the Demlo numbers. Example: 1^2=1, 11^2=121, 111^2=12321 and so on.
At first lets see how to get repunits. (10^i - 1) / 9 results in the repunits sequence: 1, 11, 111 etc.
Then calculating square of each repunits, we can get Demlo numbers.
1^2 = 1
11^2 = 121
111^2 = 12321
1111^2 = 1234321
so...
So, the code to perform these operations to generate Demlo numbers is: