cp's OEIS Frontend

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.

A203074 a(0)=1; for n > 0, a(n) = next prime after 2^(n-1).

This page as a plain text file.
%I A203074 #65 Jul 09 2025 04:33:48
%S A203074 1,2,3,5,11,17,37,67,131,257,521,1031,2053,4099,8209,16411,32771,
%T A203074 65537,131101,262147,524309,1048583,2097169,4194319,8388617,16777259,
%U A203074 33554467,67108879,134217757,268435459,536870923,1073741827,2147483659
%N A203074 a(0)=1; for n > 0, a(n) = next prime after 2^(n-1).
%C A203074 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.
%C A203074 a(n)*2^(n-1) = A133814(n-1) for n > 1 and a(n)*2^(n-1) for n > O is a subsequence of primitive practical numbers (A267124). - _Frank M Jackson_, Dec 29 2024
%H A203074 M. F. Hasler & Bill McEachen, <a href="/A203074/b203074.txt">Table of n, a(n) for n = 0..1300</a> (missing lines n = 1159..1165 from Bill McEachen)
%H A203074 Wikipedia, <a href="http://en.wikipedia.org/wiki/Complete_sequence">"Complete" sequence</a>. [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]
%F A203074 A203074(n) = 2^(n-1) + A013597(n-1), for n > 0. - _M. F. Hasler_, Mar 15 2012
%F A203074 a(n) = A104080(n-1) for n > 2. - _Georg Fischer_, Oct 23 2018
%e A203074 a(5) = 17, since this is the next prime after 2^(5-1) = 2^4 = 16.
%t A203074 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}]
%t A203074 nxt[{n_,a_}]:={n+1,NextPrime[2^n]}; NestList[nxt,{0,1},40][[All,2]] (* _Harvey P. Dale_, Oct 10 2017 *)
%o A203074 (PARI) a(n)=if(n,nextprime(2^n/2+1),1) \\ _Charles R Greathouse IV_
%o A203074 (PARI) A203074(n)=nextprime(2^(n-1)+1)-!n  \\ _M. F. Hasler_, Mar 15 2012
%o A203074 (Magma) [1] cat [NextPrime(2^(n-1)): n in [1..40]]; // _Vincenzo Librandi_, Feb 23 2018
%Y A203074 Cf. A013632, A013597, A014210, A104080, A203075, A203076.
%K A203074 nonn
%O A203074 0,2
%A A203074 _Frank M Jackson_ and _N. J. A. Sloane_, Dec 28 2011