Generate the ith term and print it
if ( n == 1 ) { System . out . print ( a + " ▁ " ) ; return ; } if ( n == 2 ) { System . out . print ( a + " ▁ " + b + " ▁ " ) ; return ; } System . out . print ( a + " ▁ " + b + " ▁ " + c + " ▁ " ) ; for ( int i = 4 ; i <= n ; i ++ ) { d = a + b + c ; System . out . print ( d + " ▁ " ) ; a = b ; b = c ; c = d ; } }