{"published":"2008-03-28 00:23:21","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftsz.hatenadiary.org%2Fentry%2F20080328%2F1206717801\" title=\"P40: goldbach conjecture - tsz\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","version":"1.0","author_url":"https://blog.hatena.ne.jp/tsz/","url":"https://tsz.hatenadiary.org/entry/20080328/1206717801","type":"rich","blog_url":"https://tsz.hatenadiary.org/","blog_title":"tsz\u306e\u65e5\u8a18","provider_url":"https://hatena.blog","image_url":null,"title":"P40: goldbach conjecture","provider_name":"Hatena Blog","categories":["L-99","Common Lisp"],"author_name":"tsz","description":"g000001\u3055\u3093\u306e\u89e3\u6cd5\u3092\u53c2\u8003\u306b\u3055\u305b\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002\u307e\u305a\u306f\u3001\u6b21\u306e\u7d20\u6570\u3092\u898b\u3064\u3051\u308b\u95a2\u6570next-prime\u3092\u5b9a\u7fa9\u3002 \u4f8b\u306b\u3088\u3063\u3066\u3001P31\u306eprime-p\u3092\u4f7f\u3044\u307e\u3059\u3002 (defun next-prime (n) (if (prime-p (1+ n)) (1+ n) (next-prime (1+ n)))) (next-prime 40) ;; => 41 \u5947\u6570\u30682\u306f\u5bfe\u8c61\u5916\u306a\u306e\u3067\u3001nil\u3092\u8fd4\u3057\u307e\u3059\u3002 ;; P40 (defun goldbach (m) (if (or (oddp m) (<= m 2)) nil (do ((l 2 (next-prime l))) ((or (prime-p (-\u2026"}