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.

A108954 a(n) = pi(2*n) - pi(n). Number of primes in the interval (n,2n].

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 2, 3, 4, 3, 4, 3, 3, 4, 5, 4, 4, 4, 4, 5, 6, 5, 6, 6, 6, 7, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 9, 10, 9, 9, 10, 10, 9, 9, 10, 10, 11, 12, 11, 12, 13, 13, 14, 14, 13, 13, 12, 12, 12, 13, 13, 14, 13, 13, 14, 15, 14, 14, 13, 13, 14, 15, 15, 15, 15, 15, 15, 16, 15, 16
Offset: 1

Views

Author

Cino Hilliard, Jul 22 2005

Keywords

Comments

a(n) < log(4)*n/log(n) < 7*n/(5*log(n)) for n > 1. - Reinhard Zumkeller, Mar 04 2008
Bertrand's postulate is equivalent to the formula a(n) >= 1 for all positive integers n. - Jonathan Vos Post, Jul 30 2008
Number of distinct prime factors > n of binomial(2*n,n). - T. D. Noe, Aug 18 2011
f(2, 2n) - f(3, n) < a(n) < f(3, 2n) - f(2, n) for n > 5889 where f(k, x) = x/log x * (1 + 1/log x + k/(log x)^2). The constant 3 can be improved. - Charles R Greathouse IV, May 02 2012
For n >= 2, a(n) is the number of primes appearing in the 2nd row of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. - Wesley Ivan Hurt, May 17 2021

References

  • F. Irschebeck, Einladung zur Zahlentheorie, BI Wissenschaftsverlag 1992, p. 40.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 181-182.

Crossrefs

Cf. A067434 (number of prime factors in binomial(2*n,n)), A193990, A074990.
Related sequences:
Primes (p) and composites (c): A000040, A002808, A000720, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

  • Maple
    A108954 := proc(n)
        numtheory[pi](2*n)-numtheory[pi](n) ;
    end proc: # R. J. Mathar, Nov 03 2017
  • Mathematica
    Table[Length[Select[Transpose[FactorInteger[Binomial[2 n, n]]][[1]], # > n &]], {n, 100}] (* T. D. Noe, Aug 18 2011 *)
    f[n_] := Length@ Select[ Range[n + 1, 2n], PrimeQ]; Array[f, 100] (* Robert G. Wilson v, Mar 20 2012 *)
    Table[PrimePi[2n]-PrimePi[n],{n,90}] (* Harvey P. Dale, Mar 11 2013 *)
  • PARI
    g(n) = for(x=1,n,y=primepi(2*x)-primepi(x);print1(y","))
    
  • Python
    from sympy import primepi
    def A108954(n): return primepi(n<<1)-primepi(n) # Chai Wah Wu, Aug 19 2024

Formula

a(n) = A000720(2*n)-A000720(n).
For n > 1, a(n) = A060715(n). - David Wasserman, Nov 04 2005
Conjecture: G.f.: Sum_{i>0} Sum_{j>=i|i+j is prime} x^j. - Benedict W. J. Irwin, Mar 31 2017
From Wesley Ivan Hurt, Sep 20 2021: (Start)
a(n) = Sum_{k=1..n} A010051(2*n-k+1).
a(n) = Sum_{k=n*(n+1)/2+2..(n+1)*(n+2)/2} A010051(A128076(k)). (End)

A067434 Number of distinct prime factors in binomial(2*n,n).

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 10, 10, 9, 10, 10, 10, 10, 12, 13, 12, 12, 13, 14, 14, 14, 14, 14, 15, 14, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 18, 19, 20, 19, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 23, 24, 23, 23, 23, 23, 24, 24, 24, 25, 25
Offset: 1

Views

Author

Benoit Cloitre, Feb 23 2002

Keywords

Comments

a(n) = A001221(A000984(n)) = length of n-th row in A226078. - Reinhard Zumkeller, May 25 2013

Crossrefs

Cf. A193990, A193991 (number of prime factors <= n and > n).

Programs

  • Haskell
    a067434 = a001221 . a000984 -- Reinhard Zumkeller, May 25 2013
    
  • Maple
    a := n -> nops(numtheory:-factorset(binomial(2*n,n))):
    seq(a(n), n=1..76); # Peter Luschny, Oct 31 2015
  • Mathematica
    Table[Length[FactorInteger[Binomial[2 n, n]]], {n, 100}] (* T. D. Noe, Aug 17 2011 *)
  • PARI
    a(n)=omega(binomial(2*n,n)) \\ Charles R Greathouse IV, May 25 2013
    
  • PARI
    valp(n,p)=my(s);while(n\=p,s+=n);s
    a(n)=my(s);forprime(p=2,2*n,if(valp(2*n,p)>2*valp(n,p),s++)); s \\ Charles R Greathouse IV, May 25 2013
    
  • Python
    from math import comb
    from sympy import primenu
    def A067434(n): return primenu(comb(n<<1,n)) # Chai Wah Wu, Aug 19 2024

Formula

a(n) ~ kn/log n, with k = log 4. - Charles R Greathouse IV, May 25 2013
Showing 1-2 of 2 results.