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-5 of 5 results.

A203075 Write n as a sum of distinct terms from A203074; if there is more than one way, choose the smallest binary number.

Original entry on oeis.org

0, 1, 10, 11, 101, 110, 111, 1010, 1011, 1101, 1110, 1111, 10001, 10010, 10011, 10101, 10110, 10111, 11010, 11011, 11101, 11110, 11111, 100111, 101010, 101011, 101101, 101110, 101111, 110001, 110010, 110011, 110101, 110110, 110111, 111010, 111011
Offset: 0

Views

Author

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

Keywords

Comments

a(n) is a binary vector for selecting terms from the complete sequence, A203074 that when summed gives n. It uses a miserly algorithm that chooses the smallest binary vector if there are multiple solutions. Somewhat similar to, although different from, A014417 and A104326.

Examples

			5 can be written as 5, i.e., 1000, or as 3+2, i.e., 110, and we choose the smaller.
18 can be written as 17+1, i.e., 100001, or as 11+5+2, i.e., 11010, and again we choose the smaller.
		

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++)];IntegerString[otable, 2]

Formula

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

A014210 Next prime after 2^n.

Original entry on oeis.org

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

Keywords

Comments

Except for a(1) = 3 instead of 2, a(n) is the least prime obtained as a binomial transform of n numbers. E.g. a(5) = (1,5,10,10,5,1).(1,1,1,1,1,6)= 37. - Amarnath Murthy, Nov 26 2003
a(n) is the smallest m for which m>(tau(m))^n, where tau(m) is the number of divisors of m. [Vladimir Shevelev, May 31 2010]
Equivalently, "Smallest prime > 2^n" while in A104080 it is "Smallest prime >= 2^n". The only difference is the 2nd term with a(1) = 3 and A104080(1) = 2. - Bernard Schott, Oct 30 2020

References

  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 615 pp. 82 and 279, Ellipses, Paris, 2004. Warning : gives Sum_{k>=1} 1/A104080(k) = 0.7404...

Crossrefs

See A203074 for another version.

Programs

  • Maple
    [ seq( nextprime( 2^i ),i=0..40) ];
  • Mathematica
    NextPrime[ n_Integer] := (k = n + 1; While[ !PrimeQ[k], k++ ]; k); Table[ NextPrime[2^n], {n, 0, 35} ]
    f[n_] := NextPrime[2^n]; Array[f, 30, 0] (* Robert G. Wilson v, Jun 05 2015 *)
    NextPrime[2^Range[0,40]] (* Harvey P. Dale, Jun 22 2017 *)
  • PARI
    a(n) = nextprime(2^n+1); \\ Michel Marcus, Oct 30 2020

Formula

Sum_{k>=0} 1/a(k) = A338475. - Bernard Schott, Oct 30 2020

A104080 Smallest prime >= 2^n.

Original entry on oeis.org

2, 2, 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

Cino Hilliard, Mar 03 2005

Keywords

Crossrefs

Except initial terms and offset, same as A014210 and A203074.
The opposite (greatest prime <= 2^n) is A014234, indices A007053.
The distance from 2^n is A092131, opposite A013603.
Counting zeros instead of both bits gives A372474, cf. A035103, A211997.
Counting ones instead of both bits gives A372517, cf. A014499, A061712.
For squarefree instead of prime we have A372683, cf. A143658, A372540.
The indices of these prime are given by A372684.

Programs

Formula

a(n) = A014210(n), n <> 1. - R. J. Mathar, Oct 14 2008
Sum_{n >= 0} 1/a(n) = A338475 + 1/6 = 1.4070738... (because 1/6 = 1/2 - 1/3). - Bernard Schott, Nov 01 2020
From Gus Wiseman, Jun 03 2024: (Start)
a(n) = A007918(2^n).
a(n) = 2^n + A092131(n).
a(n) = prime(A372684(n)).
(End)

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.

A338475 Decimal expansion of the sum of reciprocals of the smallest primes > 2^k for k >= 0.

Original entry on oeis.org

1, 2, 4, 0, 4, 0, 7, 1, 4, 6, 6, 5, 5, 9, 6, 0, 6, 2, 8, 9, 4, 6, 4, 1, 8, 0, 2, 1, 4, 0, 5, 7, 2, 8, 3, 3, 9, 2, 3, 1, 3, 8, 1, 0, 7, 3, 4, 6, 9, 0, 9, 9, 2, 6, 9, 0, 3, 7, 1, 6, 4, 2, 6, 1, 5, 7, 4, 3, 0, 0, 2, 2, 7, 5, 6, 2, 1, 2, 7, 2, 3, 9, 6, 4, 4, 7, 4, 0, 1, 9
Offset: 1

Views

Author

Bernard Schott, Oct 29 2020

Keywords

Comments

If q(k) = A014210(k) is the smallest prime > 2^k, then 2^k < q(k), so Sum_{k>=0} 1/q(k) < Sum_{k>=0} 1/2^k = 2; hence, the sum of the reciprocals of these primes q(k) form a convergent series.

Examples

			1.2404071466559606289464180214057283392313810734691...
		

References

  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 615 pp. 82 and 279, Ellipses, Paris, 2004. Warning : gives Sum_{k>=1} 1/A104080(k) = 0.7404...

Crossrefs

Programs

  • Maple
    evalf(sum(1/nextprime(2^k), k=0..infinity),90);
  • Mathematica
    ndigits = 90; RealDigits[Sum[1/NextPrime[2^k], {k, 0, ndigits/Log10[2] + 1}], 10, ndigits][[1]] (* Amiram Eldar, Oct 29 2020 *)
  • PARI
    suminf(k=0, 1/nextprime(2^k+1)) \\ Michel Marcus, Oct 29 2020

Formula

Equals Sum_{k>=0} 1/A014210(k).
Showing 1-5 of 5 results.