Get the first number ie x1 then successively multiply it by x1 k times by index number to get the required answer
for ( int i = 1 ; i <= k ; i ++ ) { System . out . print ( x1 * i + " ▁ " ) ; } System . out . println ( ) ; }