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

A051006 Prime constant: decimal value of (A010051 interpreted as a binary number).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Ferenc Adorjan (fadorjan(AT)freemail.hu): (Start)
Decimal expansion of the representation of the sequence of primes by a single real in (0,1).
Any monotonic integer sequence can be represented by a real number in (0, 1) in such a way that in the binary representation of the real, the n-th digit of the fractional part is 1 if and only if n is in the sequence.
Examples of the inverse mapping are A092855 and A092857. (End)
Is the prime constant an EL number? See Chow's 1999 article. - Lorenzo Sauras Altuzarra, Oct 05 2020
The asymptotic density of numbers with a prime number of trailing 0's in their binary representation (A370596), or a prime number of trailing 1's. - Amiram Eldar, Feb 23 2024

Examples

			0.414682509851111660... (base 10) = .01101010001010001010001... (base 2).
		

Crossrefs

Programs

  • Maple
    a := n -> ListTools:-Reverse(convert(floor(evalf[1000](sum(1/2^ithprime(k), k = 1 .. infinity)*10^(n+1))), base, 10))[n+1]: - Lorenzo Sauras Altuzarra, Oct 05 2020
  • Mathematica
    RealDigits[ FromDigits[ {{Table[ If[ PrimeQ[n], 1, 0], {n, 370}]}, 0}, 2], 10, 111][[1]] (* Robert G. Wilson v, Jan 15 2005 *)
    RealDigits[Sum[1/2^Prime[k], {k, 1000}], 10, 100][[1]] (* Alexander Adamchuk, Aug 22 2006 *)
  • PARI
    { mt(v)= /*Returns the binary mapping of v monotonic sequence as a real in (0,1)*/ local(a=0.0,p=1,l);l=matsize(v)[2]; for(i=1,l,a+=2^(-v[i])); return(a)} \\ Ferenc Adorjan
    
  • PARI
    { default(realprecision, 20080); x=0; m=67000; for (n=1, m, if (isprime(n), a=1, a=0); x=2*x+a; ); x=10*x/2^m; for (n=0, 20000, d=floor(x); x=(x-d)*10; write("b051006.txt", n, " ", d)); } \\ Harry J. Smith, Jun 15 2009
    
  • PARI
    suminf(n=1,.5^prime(n)) \\ Then: digits(%\.1^default(realprecision)) to get seq. of digits. N.B.: Functions sumpos() and sumnum() yield much less accurate results. - M. F. Hasler, Jul 04 2017

Formula

Prime constant C = Sum_{k>=1} 1/2^prime(k), where prime(k) is the k-th prime. - Alexander Adamchuk, Aug 22 2006
From Amiram Eldar, Aug 11 2020: (Start)
Equals Sum_{k>=1} A010051(k)/2^k.
Equals Sum_{k>=1} 1/A034785(k).
Equals (1/2) * A119523.
Equals Sum_{k>=1} pi(k)/2^(k+1), where pi(k) = A000720(k). (End)

A102878 Increasing partial quotients in the continued fraction expansion of the prime constant (A051006).

Original entry on oeis.org

0, 2, 3, 12, 131, 169, 199, 279, 413, 851, 2771, 18514, 20740, 20780, 147756, 207783, 312134, 361393, 6931243
Offset: 0

Views

Author

Robert G. Wilson v, Jan 15 2005

Keywords

Comments

a(19) is a 3010301-digit number (1.71206300894551448591713167863057582188628436436...*10^3010300) with digit distribution 301276, 301983, 300946, 301660, 301631, 301181, 299864, 300633, 300456 & 300671.

Crossrefs

Programs

  • Mathematica
    cf = ContinuedFraction[ FromDigits[ {{Table[ If[ PrimeQ[n], 1, 0], {n, 10^7}]}, 0}, 2]]; a = 0; Do[ If[ cf[[n]] > a, a = cf[[n]]; Print[a]], {n, 5842783}]

A036680 Expansion of C in Egyptian fractions, where C contains the primes in binary.

Original entry on oeis.org

3, 13, 226, 757098, 1493980747140, 3358884634272343840743139, 31207490927201886805011133752520957788381952996897, 1532767887228913328212783830676536430748824655051820601315140788525355884052980975649269521964006675
Offset: 0

Views

Author

Keywords

Examples

			C in binary = 0.011010100010100010100010000010100... = 1/3 + 1/13 + 1/226 + ...
		

Crossrefs

Cf. A010051 (binary), A051006 (decimal), A051007 (continued fraction).

A102913 Take characteristic function of the semiprimes A001358, interpret it as a binary fraction and convert to a decimal fraction.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Jan 17 2005

Keywords

Crossrefs

For the continued fraction form of the semiprime constant, see A102914. For the equivalent characteristic function for primes, see A010051; interpreted as a binary fraction see A051006; for the continued fraction form of that see A051007.

Programs

  • Mathematica
    Semiprime[n_] := If[Plus @@ Last[ Transpose[ FactorInteger[n]]] == 2, 1, 0]; RealDigits[ FromDigits[{Table[ Semiprime[n], {n, 2, 350}], -2}, 2], 10, 111][[1]] (* Ed Pegg Jr *)

Formula

The characteristic function of the semiprimes is the function f(n) = 1 iff n is semiprime, 0 otherwise. This begins, for n = 0, 1, 2, 3, ... f(n) = 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1... If we concatenate these bits and interpret them as the binary fraction 0.0000101001100011000001... (base 2) we have, expressed as a decimal fraction, 0.0405735002013980686743112664235357506936275821940023586083340694633362...
The characteristic function of A001358 is A064911 (for n >= 1, starting with 0, 0, 0, 1 ...). The binary constant here has an additional 0 after the binary point. - Georg Fischer, Aug 04 2021

Extensions

More terms from Robert G. Wilson v, Jan 24 2005

A103518 Indices of increasing partial quotients PQ_i of the continued fraction for the prime constant (A051006).

Original entry on oeis.org

0, 1, 4, 5, 6, 20, 31, 54, 306, 356, 762, 3174, 20240, 22693, 35793, 58491, 81251, 206410, 228533, 2921406
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    cf = ContinuedFraction[ FromDigits[ {{Table[ If[ PrimeQ[n], 1, 0], {n, 10^7}]}, 0}, 2]]; a = -1; Do[ If[ cf[[n]] > a, a = cf[[n]]; Print[n-1]], {n, 5842783}]

A103313 Positions of records in the continued fraction expansion of the prime constant.

Original entry on oeis.org

0, 1, 4, 5, 6, 20, 31, 54, 306, 356, 762, 3174, 20240, 22693, 35793, 58491, 81251, 206410, 228533, 3987683, 5635890
Offset: 0

Views

Author

Eric W. Weisstein, Jan 30 2005

Keywords

Crossrefs

Showing 1-6 of 6 results.