We consider algebras with basis numerated by elements of a group G. We fix a function f from G * G to a ground field and give a multiplication of the algebra which depends on f. We study the basic properties of such algebras. In particular, we find a condition on f under which the corresponding algebra is a Leibniz algebra. Moreover, for a given subgroup G of G we define a G-periodic algebra, which corresponds to a G-periodic function f, we establish a criterion for the right nilpotency of a G-periodic algebra. In addition, for (7 = Z we describe all 2Z- and 3Z-periodic algebras. Some properties of nZ-periodic algebras are obtained.