解:如图,取AB的中点D,连接OD、CD,∵正三角形ABC的边长为a,∴OD= 1 2 a,CD= 3 2 a,在△ODC中,OD+CD>OC,∴当O、D、C三点共线时OC最长,最大值为 1 2 a+ 3 2 a= 3 +1 2 a.故答案为: 3 +1 2 a.