This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A166048 #2 Mar 31 2012 13:21:19 %S A166048 0,1,2,3,5,6,9,12,20,21,23,30,41,42,56,72,90,110,132,156,182,210,240, %T A166048 272,306,342,380,420,462,506,552,600,650,702,756,812,870,930,992,1056, %U A166048 1122,1190,1260,1332,1406,1482,1560,1640,1722,1806,1892,1980,2070 %N A166048 a(n) = (A166049(n)-1)/4. %C A166048 Indexing sequence for A166049. %o A166048 (MIT Scheme with macro MATCHING-POS by AK): %o A166048 (define A166048 (MATCHING-POS 1 0 (lambda (n) (let ((w (A016813 n)) (hp (A005843 n))) (let loop ((i 1) (s 1)) (cond ((< s 0) #f) ((>= i hp) #t) (else (loop (1+ i) (+ s (jacobi-symbol (1+ i) w)))))))))) %K A166048 nonn %O A166048 1,3 %A A166048 _Antti Karttunen_, Oct 08 2009