login
a(n) = (A165469(n)-3)/4.
5

%I #6 Jan 13 2024 13:06:41

%S 0,1,3,5,7,9,11,13,17,19,21,23,27,29,35,37,39,41,45,47,49,53,57,59,63,

%T 65,67,71,75,77,81,83,89,95,97,99,101,107,109,111,113,117,119,125,127,

%U 129,131,133,137,139,147,149,153,155,161,165,167,169,173,179,185,187

%N a(n) = (A165469(n)-3)/4.

%o (MIT/GNU Scheme)

%o ; with MATCHING-POS macro by AK

%o (define A165468 (MATCHING-POS 1 0 (lambda (n) (let ((w (A004767 n)) (hp (A005408 n))) (let loop ((i 1) (s 1)) (cond ((<= s 0) #f) ((>= i hp) #t) (else (loop (1+ i) (+ s (jacobi-symbol (1+ i) w))))))))))

%Y Subset of A095274. Cf. A165607.

%K nonn

%O 1,3

%A _Antti Karttunen_, Oct 06 2009