However, on Amazon I noticed that there are other sellers selling something similar, but with 5 or 7 petals, not 4 petals.
Are they infringing on the patent? Or is it perfectly legal to sell a product with a modified design?
The patent number is D817,662. The D at the beginning of the number indicates it is a design patent, which only covers the appearance of the patent. Others are free to make products with the same function as long as the appearance is different enough.
If the patent number was all digits, it would indicate a utility patent. Utility patents prevent others from making products with the features described in the claims section of the patent. The claims may concern the function of the product, or the method of manufacture of the product.