login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A139758
a(n) is the smallest prime such that (a(n) - the n-th prime) is a power of 2.
2
3, 5, 7, 11, 13, 17, 19, 23, 31, 31, 47, 41, 43, 47, 79, 61, 61, 317, 71, 73, 89, 83, 211, 97, 101, 103, 107, 109, 113, 241, 131, 139, 139, 1163, 151, 167, 173, 167, 199, 181, 181, 197, 193, 197, 199, 263, 227, 227, 229, 233, 241, 241, 257, 283, 769, 271, 271
OFFSET
1,1
COMMENTS
It is only conjectured (see Cino Hilliard's comment at A094076) that this sequence is defined for all n.
FORMULA
a(n) = A000040(n) + 2^A094076(n). - R. J. Mathar, May 20 2008
MAPLE
A094076 := proc(n) local k, p ; k := 0 ; p := ithprime(n) ; while not isprime(p+2^k) do k := k+1 ; od: k ; end: A139758 := proc(n) ithprime(n)+2^A094076(n) ; end: seq(A139758(n), n=1..80) ; # R. J. Mathar, May 20 2008
MATHEMATICA
sp2[n_]:=Module[{p=Prime[n], k}, k=NextPrime[p]; While[!IntegerQ[Log[2, k-p]], k=NextPrime[k]]; k]; Array[sp2, 60] (* Harvey P. Dale, Dec 27 2019 *)
CROSSREFS
Sequence in context: A120637 A278454 A064534 * A306084 A060770 A246568
KEYWORD
nonn
AUTHOR
Leroy Quet, May 19 2008
EXTENSIONS
More terms from R. J. Mathar, May 20 2008
STATUS
approved