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-10 of 16 results. Next

A016627 Decimal expansion of log(4).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This constant (negated) is the 1-dimensional analog of Madelung's constant. - Jean-François Alcover, May 20 2014
This constant is the sum over the reciprocals of the hexagonal numbers A000384(n), n >= 1. See the Downey et al. link, and the formula by Robert G. Wilson v below. - Wolfdieter Lang, Sep 12 2016
log(4) - 1 is the mean ratio between the smaller length and the larger length of the two parts of a stick that is being broken at a point that is uniformly chosen at random (Mosteller, 1965). - Amiram Eldar, Jul 25 2020
From Bernard Schott, Sep 11 2020: (Start)
This constant was the subject of the problem B5 during the 42nd Putnam competition in 1981 (see formula Sep 11 2020 and Putnam link).
Jeffrey Shallit generalizes this result obtained for base 2 to any base b (see Amer. Math. Month. link): Sum_{k>=1} digsum(k)_b / (k*(k+1)) = (b/(b-1)) * log(b) where digsum(k)_b is the sum of the digits of k when expressed in base b (for base 10 see A334388). (End)

Examples

			1.38629436111989061883446424291635313615100026872051050824136...
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 2.
  • Frederick Mosteller, Fifty challenging problems of probability, Dover, New York, 1965. See problem 42, pp. 10 and 63.
  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 2, equation 2:13:8 at page 23.

Crossrefs

Cf. A016732 (continued fraction).
Cf. A002162 (half), A133362 (reciprocal).

Programs

  • Mathematica
    RealDigits[Log@ 4, 10, 111][[1]] (* Robert G. Wilson v, Aug 31 2014 *)
  • PARI
    default(realprecision, 20080); x=log(4); for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b016627.txt", n, " ", d)); \\ Harry J. Smith, May 16 2009, corrected May 19 2009
    
  • PARI
    A016627_vec(N)=digits(floor(log(precision(4.,N))*10^(N-1))) \\ Or: default(realprecision,N);digits(log(4)\.1^N) \\ M. F. Hasler, Oct 20 2013

Formula

log(4) = Sum_{k >= 1} H(k)/2^k where H(k) is the k-th harmonic number. - Benoit Cloitre, Jun 15 2003
Equals 1 - Sum_{k >= 1} (-1)^k/A002378(k) = 1 + 2*Sum_{k >= 0} 1/A069072(k) = 5/4 - Sum_{k >= 1} (-1)^k/A007531(k+2). - R. J. Mathar, Jan 23 2009
Equals 2*A002162 = Sum_{n >= 1} binomial(2*n, n)/(n*4^n) [D. H. Lehmer, Am. Math. Monthly 92 (1985) 449 and Jolley eq. 262]. - R. J. Mathar, Mar 04 2009
log(4) = Sum_{k >= 1} A191907(4, k)/k, (conjecture). - Mats Granvik, Jun 19 2011
log(4) = lim_{n -> infinity} A066066(n)/n. - M. F. Hasler, Oct 20 2013
Equals Sum_{k >= 1} 1/( 2*k^2 - k ). - Robert G. Wilson v, Aug 31 2014
Equals gamma(0, 1/2) - gamma(0, 1) = -(EulerGamma + polygamma(0, 1/2)), where gamma(n,x) denotes the generalized Stieltjes constants, see A020759. - Peter Luschny, May 16 2018
From Amiram Eldar, Jul 25 2020: (Start)
Equals Sum_{k>=1} (3/4)^k/k.
Equals Sum_{k>=1} 1/(k*2^(k-1)) = Sum_{k>=1} 1/A001787(k).
Equals Integral_{x=0..1} log(1+1/x) dx. (End)
Equals Sum_{k>=1} A000120(k) / (k*(k+1)). - Bernard Schott, Sep 11 2020
Equals 1 + Sum_{k>=1} zeta(2*k+1)/4^k. - Amiram Eldar, May 27 2021
Equals Sum_{k>=1} (2*k+1)*Fibonacci(k)/(k*(k+1)*2^k) (Seiffert, 1994). - Amiram Eldar, Jan 15 2022
Continued fraction: log(4) = 1 + 1/(2 + (1*2)/(2 + (2*3)/(2 + (3*4)/(2 + (4*5)/(2 + ... ))))) due to Euler. - Peter Bala, Mar 05 2024
log(4) = 2*Sum_{k>=1} 1/(k*P(k, 5/3)*P(k-1, 5/3)), where P(k, x) denotes the k-th Legendre polynomial. The first 20 terms of the series gives log(4) correct to 18 decimal places. - Peter Bala, Mar 18 2024
Equals Sum_{k>=1} (2*k - 1)!!/(k*(2*k)!!) [Ross] (see Spanier at p. 23). - Stefano Spezia, Dec 27 2024
Equals 1 + Sum_{k>=1} 1/(k*(4*k^2-1)). - Sean A. Irvine, Apr 05 2025
Equals Sum_{k>=1} (12*k^2-1)/(k*(4*k^2-1)^2). - Sean A. Irvine, Apr 06 2025
Equals Integral_{x=0..1} arctanh(sqrt(x))/sqrt(x) dx. - Kritsada Moomuang, Jun 06 2025
From Kritsada Moomuang, Jun 18 2025: (Start)
Equals Integral_{x=0..1} (x^(n - 1)*(x^(3*n) - 1))/log(x) dx, for n > 0.
Equals Integral_{x=0..Pi} sin(x)/(1 + abs(cos(x))) dx. (End)

A072473 a(n) = prime(2*n) - prime(n).

Original entry on oeis.org

1, 4, 8, 12, 18, 24, 26, 34, 38, 42, 48, 52, 60, 64, 66, 78, 80, 90, 96, 102, 108, 114, 116, 134, 132, 138, 148, 156, 162, 168, 166, 180, 180, 198, 200, 208, 216, 220, 230, 236, 242, 252, 252, 264, 266, 280, 280, 280, 294, 312, 324, 330, 336, 342, 344, 350, 350
Offset: 1

Views

Author

Amarnath Murthy, Jun 20 2002

Keywords

Comments

a(n) > prime(n) for n > 1. - Charles R Greathouse IV, Nov 22 2013
Sequence is not monotonic. - Zak Seidov, Feb 15 2015

Crossrefs

Cf. A072715.

Programs

  • Magma
    [NthPrime(2*n) - NthPrime(n): n in [1..80]]; // Vincenzo Librandi, Feb 16 2015
  • Mathematica
    Table[ Prime[2n] - Prime[n], {n, 1, 60}]
  • PARI
    a(n) = prime(2*n) - prime(n); \\ Michel Marcus, Nov 22 2013
    

Formula

a(n) = A066066(n) + A000040(n). - Reinhard Zumkeller, Jul 25 2010

Extensions

Edited by Robert G. Wilson v and Jim Nastos, Jun 21 2002

A217622 Prime(prime(2*n)).

Original entry on oeis.org

5, 17, 41, 67, 109, 157, 191, 241, 283, 353, 401, 461, 547, 587, 617, 739, 797, 877, 967, 1031, 1087, 1171, 1217, 1409, 1447, 1499, 1597, 1669, 1741, 1823, 1913, 2063, 2099, 2269, 2351, 2417, 2549, 2647, 2719, 2803, 2909, 3019, 3109, 3229, 3299, 3407, 3517
Offset: 1

Views

Author

Vincenzo Librandi, Oct 13 2012

Keywords

Comments

Subsequence of A006450.
Using the Prime Number Theorem, prime(n) ~ n log n, the asymptotic behavior is A217622(n) ~ 2n (log 2n) log(2n log 2n) ~ 2n (log n)^2 ~ A230460(n). - M. F. Hasler, Oct 19 2013

Crossrefs

Programs

  • Magma
    [NthPrime(NthPrime(2*n)): n in [1..50] ]; //
    
  • Mathematica
    Table[Prime[Prime[2n]], {n, 100}]
  • PARI
    a(n)=prime(prime(2*n)) \\ Charles R Greathouse IV, Oct 20 2013

Formula

a(n) = A000040(A031215(n)). - Omar E. Pol, Oct 19 2013
a(n) = A006450(2n). - M. F. Hasler, Oct 20 2013

A022457 a(n) = prime(2n) mod prime(n).

Original entry on oeis.org

1, 1, 3, 5, 7, 11, 9, 15, 15, 13, 17, 15, 19, 21, 19, 25, 21, 29, 29, 31, 35, 35, 33, 45, 35, 37, 45, 49, 53, 55, 39, 49, 43, 59, 51, 57, 59, 57, 63, 63, 63, 71, 61, 71, 69, 81, 69, 57, 67, 83, 91, 91, 95, 91, 87, 87, 81, 99, 93, 97, 107, 97, 87, 97, 107, 109, 95
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(2*n) mod NthPrime(n): n in [1..50]]; // G. C. Greubel, Feb 28 2018
  • Maple
    A022457 := proc(n)
        modp(ithprime(2*n),ithprime(n)) ;
    end proc:
    seq(A022457(n),n=1..67) ; # R. J. Mathar, Sep 02 2016
  • Mathematica
    Table[Mod[Prime[2*n], Prime[n]], {n, 1, 50}] (* G. C. Greubel, Feb 28 2018 *)
  • PARI
    a(n) = prime(2*n) % prime(n); \\ Michel Marcus, Sep 30 2013
    

Formula

a(n) = A031215(n) modulo A000040(n). - Michel Marcus, Sep 30 2013

A179740 Primes of the form prime(2*k) - 2*prime(k).

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 29, 31, 37, 43, 53, 59, 61, 67, 71, 83, 97, 107, 109, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 181, 191, 193, 197, 199, 211, 223, 227, 229, 239, 241, 251, 269, 271, 277, 281, 283, 293, 307, 313, 317, 331, 337, 373, 383, 389, 409
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 25 2010

Keywords

Comments

Primes in A066066.

Crossrefs

A069890 Smallest odd number k such that p(2m)-2p(m)=k has exactly n solutions (where p(m) = m-th prime).

Original entry on oeis.org

23, 1, 19, 15, 209, 433, 657, 135, 435, 2715, 9525, 9639, 20757, 20493, 4389, 47025, 27555, 193875, 162435, 51405, 811497, 764547, 832995, 811485, 811515, 193755, 1233309, 811473, 15680805, 4247325, 10797675, 12945345, 15391761
Offset: 0

Views

Author

Labos Elemer, May 06 2002

Keywords

Examples

			n=0: 23 is the smallest odd number without solutions: see A070774. For n=1, .., 8 the solutions are s1={3}, s2={41, 47}, s3={19, 23, 37}, s4={661, 769, 787, 811}, s5={1619, 1667, 1709, 1823, 1979}, s6={2777, 2843, 2851, 2861, 2897, 3251}, s7={439, 443, 449, 457, 487, 557, 593}, s8={1621, 1637, 1699, 1723, 1741, 1777, 1811, 1987}, expressed in terms of p(x) primes; either values of x and 2x indices or p(2x) are further computable. Odd numbers a(n) forming sequence corresponds to values of p(2x)-2p(x). E.g. p[2*Pi[s4]]=p[2x]={1531, 1747, 1783, 1831} and p[2x]-2p[x]]={209, 209, 209, 209} gives a(4)=209.
		

Crossrefs

Extensions

a(15)-a(32) from Donovan Johnson, Oct 27 2008

A070773 Number of solutions to p(2m)-2p(m)=2n-1, where p(m) = m-th prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 2, 0, 1, 0, 2, 1, 1, 3, 1, 1, 0, 1, 2, 0, 2, 1, 1, 1, 3, 2, 1, 3, 0, 1, 2, 2, 0, 0, 0, 0, 2, 1, 0, 3, 0, 3, 2, 3, 3, 1, 0, 0, 2, 2, 3, 2, 0, 3, 1, 0, 1, 1, 0, 1, 1, 1, 1, 7, 1, 2, 2, 1, 1, 1, 1, 2, 1, 0, 2, 0, 0, 2, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 2, 2, 3, 3, 2, 1, 2, 1, 2, 2, 4
Offset: 1

Views

Author

Labos Elemer, May 06 2002

Keywords

Comments

p(2m)-2p(m) is approximately 2m Log[2].

Examples

			n=12: 2n-1=23, no solution, so a(12)=0; n=8: 2n-1=15, p[2x]={53,61,89},2*p(x)=2*{19,23,37}={38,46,74}, p[2x]-2p[x]={15,15,15}, three solutions, so a(8)=3.
		

Crossrefs

Programs

  • Mathematica
    j=0; Table[Print[j]; j=0; Do[s=Prime[2*n]-2*Prime[n]; If[Equal[s, 2*k-1], j=j+1], {n, 1, 2*k}], {k, 1, 11000}] (*number of solution=j*)

A070774 Odd numbers n such that p(2m)-2p(m)=n has no solution (p(m) = m-th prime).

Original entry on oeis.org

23, 27, 41, 47, 65, 73, 75, 77, 79, 85, 89, 101, 103, 113, 119, 125, 155, 159, 161, 165, 169, 175, 179, 183, 215, 217, 221, 233, 249, 253, 257, 263, 265, 275, 289, 291, 297, 299, 311, 329, 339, 341, 345, 347, 349, 353, 359, 363, 367, 375, 377, 379, 385, 395
Offset: 1

Views

Author

Labos Elemer, May 06 2002

Keywords

Crossrefs

A230481 a(n) = prime(prime(2*n)) - prime(2*prime(n)).

Original entry on oeis.org

-2, 4, 12, 24, 30, 56, 52, 78, 84, 82, 108, 88, 126, 144, 126, 162, 150, 204, 210, 210, 248, 242, 234, 348, 266, 268, 320, 362, 380, 394, 304, 396, 340, 480, 378, 420, 466, 486, 476, 464, 498, 578, 476, 566, 592, 678, 600, 456, 524, 660, 714, 742, 768, 756
Offset: 1

Views

Author

M. F. Hasler, Oct 20 2013

Keywords

Comments

As difference of two odd primes, all terms are even.

Crossrefs

Programs

  • PARI
    a=n->prime(prime(2*n))-prime(2*prime(n))

Formula

a(n) = A217622(n) - A230460(n) = 2*A230482(n).

A230482 a(n) = (prime(prime(2*n)) - prime(2*prime(n)))/2.

Original entry on oeis.org

-1, 2, 6, 12, 15, 28, 26, 39, 42, 41, 54, 44, 63, 72, 63, 81, 75, 102, 105, 105, 124, 121, 117, 174, 133, 134, 160, 181, 190, 197, 152, 198, 170, 240, 189, 210, 233, 243, 238, 232, 249, 289, 238, 283, 296, 339, 300, 228, 262, 330, 357, 371, 384, 378, 372
Offset: 1

Views

Author

M. F. Hasler, Oct 20 2013

Keywords

Comments

As difference of two odd primes, all terms of A230481(n) = prime(prime(2*n))-prime(2*prime(n)) are even, which motivates to define the present sequence.
Further values: a(100)=617, a(10^3)=9344, a(10^4)=114171, a(10^5)=1325772, a(10^6)=14979156; a(10^10)~2.2*10^11, a(10^20)~3.9*10^21, a(10^30)~5.5*10^31.

Crossrefs

Programs

  • PARI
    a=n->(prime(prime(2*n))-prime(2*prime(n)))/2

Formula

a(n) = (A217622(n) - A230460(n))/2.
Showing 1-10 of 16 results. Next