To do what you're wanting to do directly in Slic3r you'd need the ability to perform math and/or use conditional statements on the Slic3r environment variables, and I've not found any documentation suggesting either is currently possible.
What you
can do is add a commented line to the layer-change G-code to make it easier to find and modify after the fact, either for a post-processing script or manual text-editing...something along the lines of:
; Start of Layer [layer_num]!
Note, based on my experimentation with it, [layer_num] is zero-indexed, so to find the beginning of the seventh layer you would want to search for "Layer 6!"
I put the exclamation point in so it will only find Layer 6, not Layer 60 or 61 or 62, or so forth. If high-level environment variable math is ever implemented, exclamation point might mean factorial, so you might have to change it to keep your layer numbers from being 1, 1, 2, 6, 24, 120, and so forth.