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 A130971 #8 Jul 24 2025 19:14:04 %S A130971 2,2,3,3,3,3,13,3,7,3,23,5,23,11,17,11,5,3,3,7,41,47,19,73,31,37,71, %T A130971 43,19,97,131,3,73,11,107,23,29,131,89,83,163,53,127,191,59,71,83,191, %U A130971 29,101,23,17,113,5,193,7,13,239,149,277,229,37,179,307,199,61,181,353,283 %N A130971 Smallest prime p, such that either |A000040(n)-p| or A000040(n)+p is of the form 2^k. %H A130971 Ray Chandler, <a href="/A130971/b130971.txt">Table of n, a(n) for n=1..10000</a> %o A130971 (Scheme) (define (A130971 n) (let ((p1 (A000040 n))) (let loop ((i 1) (p2 2)) (cond ((pow2? (abs (- p1 p2))) p2) ((pow2? (+ p1 p2)) p2) (else (loop (+ i 1) (A000040 (+ i 1)))))))) %o A130971 (define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1))))) %Y A130971 Cf. A130971, A130972, A103150. %K A130971 nonn %O A130971 1,1 %A A130971 _Antti Karttunen_, Jun 19 2007 %E A130971 Extended by _Ray Chandler_, Aug 06 2010