Trying to retrieve current frame number for use in Cycles particle age material
One way is to animate it:


Add a value node (&#8679; ShiftA)
On the first frame set the value to the frame number (in this case 1) and press I while hovering over the input field.
Do the same for the last frame.
Change the keyframe interpolation to Linear (T) in the graph editor.






Ideally you could just type #frame into the value node, however it seems the value only updates when you toggle in and out of edit mode (or in some way cause the object to re-evaluate). It doesn't update automatically when rendering :/

Hopefully this will be fixed with the new depsgraph :)