#JavaScript (*ES6*) 21 <s>27</s> <!-- language-all: lang-js --> The rule: `(y%4==0) && (y%100!=0 || y%400==0)` Golfed: `!(y%100<1&&y%400||y%4)` (mainly using [De Morgans's law][1]) **Edit** -6 chars, thanks David Hammen `!(y%(y%25?4:16))` A function implementing the rule: l=y=>!(y%(y%25?4:16)) A test (run in Firefox) just to be sure: <!-- begin snippet: js hide: false --> <!-- language: lang-js --> l=y=>!(y%(y%25?4:16)) for(o=[],i=0;i<700;i++) y=i+1800, x=l(y), o[i/100|0]=(o[i/100|0]||'')+y+(x?' <b>Y</b>':' <i>N</i>')+'\n' R.innerHTML='<td>'+o.join('</td><td>')+'</td>' console.log(o[1]) <!-- language: lang-css --> td { white-space: pre; font-family: monospace; padding: 8px} b { color: red; } i { color: blue; } <!-- language: lang-html --> <table> <tr id=R></tr> </table> <!-- end snippet --> [1]: http://en.wikipedia.org/wiki/De_Morgan%27s_laws