ciąg arytmetyczny - inne rozwiązanie