login
A130970
Smallest prime p, such that |A000040(n)-p| is of the form 2^k.
1
3, 2, 3, 3, 3, 5, 13, 3, 7, 13, 23, 5, 37, 11, 31, 37, 43, 29, 3, 7, 41, 47, 19, 73, 89, 37, 71, 43, 101, 97, 131, 3, 73, 11, 151, 23, 29, 131, 103, 109, 163, 53, 127, 191, 181, 71, 83, 191, 163, 101, 229, 223, 113, 283, 193, 7, 13, 239, 149, 277, 251, 37, 179, 307, 281, 61
OFFSET
1,1
LINKS
PROG
(Scheme:) (define (A130970 n) (let ((p1 (A000040 n))) (let loop ((i 1)) (cond ((pow2? (abs (- p1 (A000040 i)))) (A000040 i)) (else (loop (+ i 1)))))))
(define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1)))))
CROSSREFS
Sequence in context: A182021 A370231 A117451 * A144733 A091460 A035093
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 19 2007
EXTENSIONS
Extended by Ray Chandler, Aug 06 2010
STATUS
approved