From Old Irish cethramad (“fourth”). By surface analysis, ceithir + -amh.
an ceathramh
ceathramh m (genitive singular ceathraimh, plural ceathramhan)