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 18 results. Next

A383214 a(n) = A067434(n) - A383213(n).

Original entry on oeis.org

1, 1, 0, 1, -1, 1, 0, 1, 0, 0, 0, 0, 0, -1, 1, 1, -1, 1, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1, 1, -1, 0, 1, 0, 0, 0, 0, 0, 1, -2, 1, -1, 1, 0, -1, 1, 0, -1, 1, 0, 0, 0, 0, -1, 2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 1, 0, 0, 0, 0, -1, 1, 0, -1, 1, -1, 1, 0, -1, 1
Offset: 1

Views

Author

Clark Kimberling, Apr 19 2025

Keywords

Comments

Least n such that a(n) = -3 is 7055; least n such than a(n) = 3 is 740.

Crossrefs

Programs

  • Mathematica
    u = Table[PrimeNu[Binomial[2 n, n]], {n,  200}]     (* A067434 *)
    v = Table[PrimeNu[Binomial[2 n, n + 1]], {n,  200}] (* A383213 *)
    u - v

A071855 Numbers n such that A067434(n) = A000720(n) + A000005(n).

Original entry on oeis.org

1, 37, 41, 43, 47, 49, 58, 65, 69, 81, 85, 92, 128, 130, 135, 136, 154, 184, 208, 220, 228, 450, 540, 840
Offset: 1

Views

Author

Benoit Cloitre, Jun 09 2002

Keywords

Comments

No further terms below 143260.
No further terms below 2*10^4. - Robert G. Wilson v

Programs

  • Mathematica
    Select[ Range[10^3], Length[ FactorInteger[ Binomial[2#, # ]]] == PrimePi[ # ] + DivisorSigma[0, # ] & ]
  • PARI
    for(n=1,1000,if(omega(binomial(2*n,n))=sum(i=1,n,isprime(i))+numdiv(n),print1(n,",")))

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)

A060308 Largest prime <= 2n.

Original entry on oeis.org

2, 3, 5, 7, 7, 11, 13, 13, 17, 19, 19, 23, 23, 23, 29, 31, 31, 31, 37, 37, 41, 43, 43, 47, 47, 47, 53, 53, 53, 59, 61, 61, 61, 67, 67, 71, 73, 73, 73, 79, 79, 83, 83, 83, 89, 89, 89, 89, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 113, 113, 113, 113, 113, 127, 127, 131
Offset: 1

Views

Author

Labos Elemer, Mar 27 2001

Keywords

Comments

a(n) is the smallest k such that C(2n,n) divides k!. - Benoit Cloitre, May 30 2002
a(n) is largest prime factor of C(2n,n) = (2n)!/(n!)^2. - Alexander Adamchuk, Jul 11 2006
a(n) is also the largest prime in the interval [n,2n]. - Peter Luschny, Mar 04 2011
Odd prime p repeats (q-p)/2 times, where q > p is the next prime. In particular, every lesser of twin primes (A001359) occurs 1 time, every lesser more than 3 of cousin primes (A023200) occurs 2 times, etc. - Vladimir Shevelev, Mar 12 2012

Examples

			n=1, 2n=2, p(1) = 2 = a(1) is the largest prime not exceeding 2.
		

Crossrefs

Apart from initial term, same as A060265.
Cf. A007917 (largest prime <= n), A005843 (2n).

Programs

Formula

a(n) = Max[FactorInteger[(2n)!/(n!)^2]]. - Alexander Adamchuk, Jul 11 2006
a(n) = A006530(A000142(2*n)) and a(n) = A006530(A056040(2*n)). - Peter Luschny, Mar 04 2011
a(n) ~ 2*n as n tends to infinity. - Vladimir Shevelev, Mar 12 2012
a(n) = A007917(A005843(n)) = A226078(n, A067434(n)). - Reinhard Zumkeller, May 25 2013

Extensions

More terms from Alexander Adamchuk, Jul 11 2006

A034973 Number of distinct prime factors in central binomial coefficients C(n, floor(n/2)), the terms of A001405.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Sequence is not monotonic. E.g., a(44)=10, a(45)=9 and a(46)=10. The number of prime factors of n! is pi(n), but these numbers are lower.
Prime factors are counted without multiplicity. - Harvey P. Dale, May 20 2012

Examples

			a(25) = omega(binomial(25,12)) = omega(5200300) = 6 because the prime factors are 2, 5, 7, 17, 19, 23.
		

Crossrefs

Programs

A081387 Number of non-unitary prime divisors of central binomial coefficient, C(2n,n) = A000984(n), i.e., number of prime factors in C(2n,n) whose exponent is greater than one.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Examples

			For n = 14: binomial(28,14) = 40116600 = 2*2*2*3*3*3*5*5*17*19*23; unitary prime divisors: {17,19,23}; non-unitary prime divisors: {2,3,5}, so a(14) = 3.
		

Crossrefs

Programs

Formula

a(n) = A056170(A000984(n)) = A001221(A000984(n)) - A081386(n) = A067434(n) - A081386(n).

A226078 Table read by rows: prime power factors of central binomial coefficients, cf. A000984.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 2, 5, 7, 4, 9, 7, 4, 3, 7, 11, 8, 3, 11, 13, 2, 9, 5, 11, 13, 4, 5, 11, 13, 17, 4, 11, 13, 17, 19, 8, 3, 7, 13, 17, 19, 4, 7, 13, 17, 19, 23, 8, 25, 7, 17, 19, 23, 8, 27, 25, 17, 19, 23, 16, 9, 5, 17, 19, 23, 29, 2, 9, 5, 17, 19, 23, 29, 31
Offset: 0

Views

Author

Reinhard Zumkeller, May 25 2013

Keywords

Examples

			.   n        initial rows               A000984(n)   A226047(n)
.  ---+------------------------------+-------------+------------
.   0   [1]                                      1
.   1   [2]                                      2            2
.   2   [2,3]                                    6            3
.   3   [4,5]                                   20            5
.   4   [2,5,7]                                 70            7
.   5   [4,9,7]                                252            9
.   6   [4,3,7,11]                             924           11
.   7   [8,3,11,13]                           3432           13
.   8   [2,9,5,11,13]                        12870           13
.   9   [4,5,11,13,17]                       48620           17
.  10   [4,11,13,17,19]                     184756           19
.  11   [8,3,7,13,17,19]                    705432           19
.  12   [4,7,13,17,19,23]                  2704156           23
.  13   [8,25,7,17,19,23]                 10400600           25
.  14   [8,27,25,17,19,23]                40116600           27
.  15   [16,9,5,17,19,23,29]             155117520           29
.  16   [2,9,5,17,19,23,29,31]           601080390           31
.  17   [4,27,5,11,19,23,29,31]         2333606220           31
.  18   [4,3,25,7,11,19,23,29,31]       9075135300           31
.  19   [8,3,25,7,11,23,29,31,37]      35345263800           37
.  20   [4,9,5,7,11,13,23,29,31,37]   137846528820           37 .
		

Crossrefs

Cf. A067434 (row lengths), A001316 (left edge), A060308 (right edge), A226047 (row maxima), A226083 (row minima), A000984 (row products).
Cf. A267823.

Programs

  • Haskell
    a226078 n k = a226078_tabf !! n !! k
    a226078_row n = a226078_tabf !! n
    a226078_tabf = map a141809_row a000984_list
    
  • Maple
    f:= n-> add(i[2]*x^i[1], i=ifactors(n)[2]):
    b:= proc(n) local p;
          p:= add(f(n+i) -f(i), i=1..n);
          seq(`if`(coeff(p, x, i)>0,
                 i^coeff(p, x, i), NULL), i=1..degree(p))
        end:
    T:= n-> `if`(n=0, 1, b(n)):
    seq(T(n), n=0..30);  # Alois P. Heinz, May 25 2013
  • Mathematica
    Table[Power @@@ FactorInteger[(2n)!/n!^2] , {n, 0, 30}] // Flatten (* Jean-François Alcover, Jul 29 2015 *)
  • PARI
    row(n)= if(n<1, [1], [ e[1]^e[2] |e<-Col(factor(binomial(2*n, n)))]); \\ Ruud H.G. van Tol, Nov 18 2024

Formula

T(n,k) = A141809(A000984(n),k) for k = 0..A067434(n)-1.

A081386 Number of unitary prime divisors of central binomial coefficient, C(2n,n) = A000984(n), i.e., number of those prime factors in C(2n,n), whose exponent equals one.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Examples

			n=10: C(20,10) = 184756 = 2*2*11*13*17*19; unitary-p-divisors = {11,13,17,19}, so a(10)=4.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[m, Count[Divisors@ m, k_ /; And[PrimeQ@ k, GCD[k, m/k] == 1]]]@ Binomial[2 n, n], {n, 50}] (* Michael De Vlieger, Dec 17 2016 *)
  • PARI
    a(n) = my(f=factor(binomial(2*n, n))); sum(k=1, #f~, f[k,2] == 1); \\ Michel Marcus, Dec 18 2016

Formula

a(n) = A056169(A000984(n)).

A226047 Largest prime power dividing binomial(2n, n).

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 13, 13, 17, 19, 19, 23, 25, 27, 29, 31, 31, 31, 37, 37, 41, 43, 43, 47, 49, 49, 53, 53, 53, 59, 61, 61, 61, 67, 67, 71, 73, 73, 73, 79, 81, 83, 83, 83, 89, 89, 89, 89, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 113, 113
Offset: 1

Views

Author

Keywords

Comments

The first indices n for which a(n) < a(n-1) are 123, 315, 366, 671, 1095, 1098, 1204, 1565, 6095, 7326, 9843, 39065, 58828, 88575, 88578, 195315, 195320, 265722, 265725 and 709937. - Giovanni Resta, May 24 2013
a(n) = maximum of n-th row in A226078. - Reinhard Zumkeller, May 25 2013

Examples

			Binomial(10, 5) = 2^2 * 3^2 * 7 and so a(5) = max({2^2, 3^2, 7}) = 3^2.
		

Crossrefs

Programs

  • Haskell
    a226047 = maximum . a226078_row  -- Reinhard Zumkeller, May 25 2013
  • Maple
    f:= n-> add(i[2]*x^i[1], i=ifactors(n)[2]):
    a:= proc(n) local p;
          p:= add(f(n+i) -f(i), i=1..n);
          max(seq(i^coeff(p, x, i), i=1..degree(p)))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, May 24 2013
  • Mathematica
    cnt[n_, p_] := (n - Total@IntegerDigits[n, p])/(p-1); a[n_] := Block[{k = 2*n, p, e}, While[! PrimePowerQ[k] || ({p, e} = FactorInteger[k][[1]]; cnt[2*n , p] - 2 cnt[n, p] != e), k--]; k]; Array[a, 60] (* Giovanni Resta, May 24 2013 *)
    Table[Max[Select[Divisors[Binomial[2 n,n]],PrimePowerQ]],{n,60}] (* Harvey P. Dale, Feb 26 2024 *)
  • PARI
    ord(n,p)=my(s);while(n\=p,s+=n);s
    a(n)=my(p=precprime(2*n));forstep(k=2*n,p+1,-1, my(q,e=isprimepower(k, &q)); if(e && e == ord(2*n,q)-2*ord(n,q), return(k)));p /* requires PARI v.2.5 or later */
    
  • PARI
    A226047(n)={for(k=2,#n=factor(binomial(2*n,n))~,factorback(n[,k-1]~)>factorback(n[,k]~) && n[,k]=n[,k-1]);factorback(n[,#n]~)} \\ highly unoptimized, not suitable for n>>10^4. - M. F. Hasler, May 24 2013
    

Formula

Erdős proved that a(n) <= 2n.

A193990 Number of distinct prime factors <= n of binomial(2*n,n).

Original entry on oeis.org

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

Views

Author

T. D. Noe, Aug 17 2011

Keywords

Crossrefs

Cf. A067434 (number of prime factors in binomial(2*n,n)), A108954.

Programs

  • Maple
    a := n -> nops(numtheory:-factorset(binomial(2*n,n)) minus select(isprime, {$n+1..2*n})): seq(a(n), n=1..82); # Peter Luschny, Oct 31 2015
  • Mathematica
    Table[Length[Select[Transpose[FactorInteger[Binomial[2 n, n]]][[1]], # <= n &]], {n, 100}]
  • PARI
    valp(n, p)=my(s); while(n\=p, s+=n); s
    a(n)=my(s); forprime(p=2, n, if(valp(2*n, p)>2*valp(n, p), s++)); s \\ Charles R Greathouse IV, May 25 2013
Showing 1-10 of 18 results. Next