Q. Is there a problem eating olives since they are supposed to make you forget?
A. Talmud (Horayos 13b) teaches that five things cause forgetting the Torah one has learned; one of them is eating olives regularly.
Poiskim differ whether this is an actual prohibition (Divrei Malkiel 4: 1, Hisorerus Teshuvo 367, Lehoros Nossan 1: 59. See Piskey Teshuvos 170: 18) or if it is only good advice and a recommendation (Yabia Omer Y.D. 3: 8 :4, Sefer Hazikaron – Siach Hassode, introd.)
Many Poiskim opine that the Talmud is only referring to raw or fresh olives not the ones that have been pickled or salted (Mor Uk'tzio 170, Kaf Hachaim 157: 27 et. al.) Others maintain that adding olive oil (which is beneficial for memory) to the olives, removes their detrimental effect (Shalmas Chaim 501), However, Sefer Hazikaron (11) disagrees. How much oil should be added? Halichos Shlomo (Tefiloh 2, note 103) mentions even a very small amount others disagree. Some suggest immersing them in olive oil (Shemiras Hanefesh, notes), others sustain that it does not help (Oisrei Laggefen p. 347)
What exactly qualifies as being "roggil" or regular is also in dispute. Sefer Hazikaron (p. 10) maintains that even eating olives once in thirty days meets the criteria, (as in Brochos 40a – on eating lentils). Others (Vein Lomo Michshol p. 345) argue that "roggil" is every day (as in Brochos 6b – on attending shul). Maim Chaim (O.H. 190) rules that even eating olives every day if the amounts are small, is not called being regular. There is also one opinion that asserts that only black olives can cause forgetting not the green ones (Toras Yaakov 3, quoting Avrohom Ezkor)
Finally, the Arizal (quoted in Kaf Ha'Chayim 24:43) writes that olives cause amei haaretz to forget, but if one eats them with the right kavanah or intention, on the contrary they help one to remember. We should intend 'Kel Elokim Matzpatz', which has the same Gematriya (417) as zayis, and this intention counters the forgetting power of olives
Horav Shlomo Miller's Shlit"a opinion is that there is no prohibition on eating olives and "roggil" could be even less than thirty days.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit"a.