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.

Showing 1-2 of 2 results.

A203076 Convert A203075(n) to base 10.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 26, 27, 29, 30, 31, 39, 42, 43, 45, 46, 47, 49, 50, 51, 53, 54, 55, 58, 59, 61, 62, 63, 67, 69, 70, 71, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 90, 91, 93, 94, 95
Offset: 0

Views

Author

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

Keywords

Comments

Any nonnegative number can be written as a sum of distinct terms of the complete sequence, A203074. Terms a(n) are decimal representations of binary vectors (in ascending powers of 2) used to select terms of A203074 that when summed give n.

Crossrefs

Programs

  • Mathematica
    nextprime[n_Integer] := (k=n+1;While[!PrimeQ[k], k++];k);aprime[m_Integer] := (If[m==0, 1, nextprime[2^(m-1)]]);seqtable[l_] := (stable=Table[aprime[j], {j, 0, l}];stable);inttable[p_] := (itable=Reverse[IntegerDigits[p, 2]];itable);h=1;otable={0};ttable={};While[h<100, (inttable[h];seqtable[Length[itable]-1];test=itable.stable;If[!MemberQ[ttable, test], AppendTo[otable, h], Null];AppendTo[ttable, test];h++)];otable

Formula

Binary(a(n)) x A203074 = n, where x is the inner product and the binary vector is in ascending powers of 2 with infinite trailing zeros.

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

Original entry on oeis.org

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
Offset: 0

Views

Author

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

Keywords

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.
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

Examples

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

Crossrefs

Programs

  • Magma
    [1] cat [NextPrime(2^(n-1)): n in [1..40]]; // Vincenzo Librandi, Feb 23 2018
  • 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 *)
  • 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
    

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
Showing 1-2 of 2 results.