login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A203074 a(0)=1; for n > 0, a(n) = next prime after 2^(n-1). 5
1, 2, 3, 5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459, 536870923, 1073741827, 2147483659 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Equals {1} union A014210. Unlike A014210, every positive integer can be written in one or more ways as a sum of terms of this sequence. See A203075, A203076.

LINKS

M. F. Hasler & Bill McEachen, Table of n, a(n) for n = 0..1300 (missing lines n=1159..1165 from Bill McEachen)

Wikipedia, Complete sequence.

FORMULA

A203074(n) = 2^(n-1) + A013597(n-1), for n > 0. - M. F. Hasler, Mar 15 2012

a(n) = A104080(n-1) for n > 2. - Georg Fischer, Oct 23 2018

EXAMPLE

a(5) = 17, since this is the next prime after 2^(5-1) = 2^4 = 16.

MATHEMATICA

nextprime[n_Integer] := (k=n+1; While[!PrimeQ[k], k++]; k); aprime[m_Integer] := (If[m==0, 1, nextprime[2^(m-1)]]); Table[aprime[l], {l, 0, 100}]

nxt[{n_, a_}]:={n+1, NextPrime[2^n]}; NestList[nxt, {0, 1}, 40][[All, 2]] (* Harvey P. Dale, Oct 10 2017 *)

PROG

(PARI) a(n)=if(n, nextprime(2^n/2+1), 1) \\ Charles R Greathouse IV

(PARI) A203074(n)=nextprime(2^(n-1)+1)-!n \\ M. F. Hasler, Mar 15 2012

(Magma) [1] cat [NextPrime(2^(n-1)): n in [1..40]]; // Vincenzo Librandi, Feb 23 2018

CROSSREFS

Cf. A013632, A013597, A014210, A104080, A203075, A203076.

Sequence in context: A298598 A079370 A014210 * A014556 A062737 A085613

Adjacent sequences: A203071 A203072 A203073 * A203075 A203076 A203077

KEYWORD

nonn

AUTHOR

Frank M Jackson and N. J. A. Sloane, Dec 28 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 3 19:41 EST 2022. Contains 358543 sequences. (Running on oeis4.)