|
|
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
|
Wikipedia, "Complete" sequence. [Wikipedia calls a sequence "complete" (sic) if every positive integer is a sum of distinct terms. This name is extremely misleading and should be avoided. - N. J. A. Sloane, May 20 2023]
|
|
FORMULA
|
|
|
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
|
(Magma) [1] cat [NextPrime(2^(n-1)): n in [1..40]]; // Vincenzo Librandi, Feb 23 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|