Dope sheet keyframes: select every nth frame
Select evenly indexed keyframe points and handles.

The keyframes in the fcurve are in order when iterated. Select every second (odd one) by making a False, True, False, True,... list the same length as keyframe points to select the points and handles accordingly.

Test script, (every second) selects the keyframes of the context objects animation. The one shown when action editor is chosen from dope sheet.

import bpy
context = bpy.context
ob = context.object
ad = ob.animation_data
action = ad.action if ad else None
if action:
    for fc in action.fcurves:
        #fc.select = True # select fcurve too?
        sel = list(bool(i % 2) for i in range(len(fc.keyframe_points)))
        # select point and handles
        fc.keyframe_points.foreach_set("select_control_point", sel)
        fc.keyframe_points.foreach_set("select_left_handle", sel)
        fc.keyframe_points.foreach_set("select_right_handle", sel)
        #del(sel)  # clean up?


Notes: 


Replace action = ad.action ... line above with action = bpy.data.actions.get("SomeActionName") if you know the action you want to modify by name.
For every nth, in this case every 3rd, where for example sake there are 15 keyframes (py console code)

&gt;&gt;&gt; nth = 3
&gt;&gt;&gt; sel = list(not (i + 1) % nth for i in range(15))
&gt;&gt;&gt; sel
[False, False, True, False, False, True, False, False, True, False, False, True, False, False, True]

% is the modulus operator, for integers its the remainder, eg 5 % 3 == 2  Indexes start from 0.