In C++, it can be written inside a for loop:
for(int i = 1; i < n; i++)
{
for(int j = i; j <= n; j = j*7) // increase j multiplication of 7
{
// codes goes here
}
}
but how to increase step by multiplication of a number in range() function in Python?