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

A058077 Binomial coefficients formed from consecutive primes: a(n) = binomial( prime(n+1), prime(n) ).

Original entry on oeis.org

3, 10, 21, 330, 78, 2380, 171, 8855, 475020, 465, 2324784, 101270, 903, 178365, 22957480, 45057474, 1830, 99795696, 971635, 2628, 277962685, 1837620, 581106988, 144520208820, 4082925, 5253, 5160610, 5886, 6438740
Offset: 1

Views

Author

Labos Elemer, Nov 13 2000

Keywords

Comments

Conjecture: for each value of n > 1, if a(n+1) has the same number of digits as a(n) and a(n+1) > a(n), then prime(n+2) - prime(n+1) = prime(n+1) - prime(n). This conjecture has been verified for all n < 3*10^7. - Ahmad J. Masad, Oct 08 2019

Examples

			n=6: a(6) = C(p(7),p(6)) = C(17,13) = 57120/24 = 2380.
		

Crossrefs

Programs

  • Mathematica
    Table[Binomial[Prime[n+1],Prime[n]],{n,1,20}] (* Vaclav Kotesovec, Nov 13 2014 *)

Formula

a(n) = binomial(A000040(n+1), A001223(n)).

Extensions

Offset corrected by Vaclav Kotesovec, Nov 13 2014

A201461 Triangle read by rows: n-th row (n>=0) gives coefficients of the polynomial ((x+1)^(2^n) + (x-1)^(2^n))/2.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 28, 70, 28, 1, 1, 120, 1820, 8008, 12870, 8008, 1820, 120, 1, 1, 496, 35960, 906192, 10518300, 64512240, 225792840, 471435600, 601080390, 471435600, 225792840, 64512240, 10518300, 906192, 35960, 496, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 01 2011

Keywords

Comments

Wanted: reference for the fact that these polynomials are irreducible. Washington, Cyclotomic Fields, perhaps?
The algorithm r(n) = (1/2)*(r(n-1) + A/r(n-1)), starting with r(0) = A, used for approximating sqrt(A), which is known as the Babylonian method or Hero's method after the first-century Greek mathematician Hero of Alexandria and which can be derived from Newton's method, generates fractions beginning with (A+1)/2, (A^2 + 6*A + 1)/(4*(A+1)), (A^4 + 28*A^3 + 70*A^2 + 28*A + 1)/(8*(A+1)*(A^2 + 6*A + 1)), ... This is p(n,sqrt(A))/(2^n*Product_{k=1..n-1} p(k,sqrt(A))) with the given polynomial p(n,x) = ((x+1)^(2^n) + (x-1)^(2^n))/2. - Martin Renner, Jan 11 2017
The quadratic coefficient of this polynomial is A006516(n), the even-indexed coefficients are binomial(2^n,2*k) or A086645(2^(n-1),k) for 0 <= k <= 2^(n-1), in each row the maximum central coefficient for n>=2 is A037293(n) or A000984(2^(n-1)). - Martin Renner, Jan 14 2017
T(n,k) and A281122 are a bisection of row 2^n of Pascal's triangle A007318. - Martin Renner, Jan 15 2017
For nonnegative real x, sqrt(x) = (2*x/(1 + x)) * (2*(1 + x)^2/(1 + 6*x + x^2)) * (2*(1 + 6*x + x^2)^2/(1 + 28*x + 70*x^2 + 28*x^3 + x^4)) * .... See Bauer. - Peter Bala, Jan 18 2022

Examples

			The first few polynomials are:
1,
x^2 + 1,
x^4 + 6*x^2 + 1,
x^8 + 28*x^6 + 70*x^4 + 28*x^2 + 1,
x^16 + 120*x^14 + 1820*x^12 + 8008*x^10 + 12870*x^8 + 8008*x^6 + 1820*x^4 + 120*x^2 + 1.
The triangle of coefficients begins:
[0] [1]
[1] [1, 0, 1]
[2] [1, 0, 6, 0, 1]
[3] [1, 0, 28, 0, 70, 0, 28, 0, 1]
[4] [1, 0, 120, 0, 1820, 0, 8008, 0, 12870, 0, 8008, 0, 1820, 0, 120, 0, 1]
The triangle of nonzero coefficients begins:
[0] 1
[1] 1, 1
[2] 1, 6, 1
[3] 1, 28, 70, 28, 1
[4] 1, 120, 1820, 8008, 12870, 8008, 1820, 120, 1
[5] 1, 496, 35960, 906192, 10518300, 64512240, 225792840, 471435600, 601080390, 471435600, 225792840, 64512240, 10518300, 906192, 35960, 496, 1
...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Binomial[2^n,2k],{n,0,6},{k,0,2^(n-1)}]] (* Indranil Ghosh, Feb 22 2017 *)
  • PARI
    row(n) = my(v = Vec(((x+1)^(2^n)+(x-1)^(2^n))/2)); vector(#v\2 + 1, k, v[2*k-1]); \\ Michel Marcus, Jan 14 2017
    
  • PARI
    T(n,k)=binomial(2^n,2*k);
    for(n=0,5,for(k=0,2^(n-1),print1(T(n,k),", "));print()); \\ Joerg Arndt, Jan 15 2017
    
  • SageMath
    def A201461_polynomial(n): return expand(((x+1)^(2^n) + (x-1)^(2^n))/2)
    for n in range(6): print(A201461_polynomial(n))
    for n in range(6): print(A201461_polynomial(n).list()) # coefficients
    for n in range(6): # depunched (not a mathematical operation)
        if n == 0: print([1])
        else: print(A201461_polynomial(n).list()[::2]) # Peter Luschny, Jan 11 2021

Formula

T(n,k) = binomial(2^n,2*k). - Joerg Arndt, Jan 15 2017

A340263 T(n, k) = [x^k] ((1-x)^(2^n) + 2^(-n)*((2^n-1)*(x-1)^(2^n) + (x+1)^(2^n)))/2. Irregular triangle read by rows, for n >= 0 and 0 <= k <= 2^n.

Original entry on oeis.org

1, 1, -1, 1, 1, -3, 6, -3, 1, 1, -7, 28, -49, 70, -49, 28, -7, 1, 1, -15, 120, -525, 1820, -4095, 8008, -10725, 12870, -10725, 8008, -4095, 1820, -525, 120, -15, 1
Offset: 0

Views

Author

Peter Luschny, Jan 06 2021

Keywords

Comments

Conjecture: for n >= 1 the polynomials are irreducible.

Examples

			Polynomials begin:
[0] 1;
[1] x^2 - x + 1;
[2] x^4 - 3*x^3 + 6*x^2 - 3*x + 1;
[3] x^8 - 7*x^7 + 28*x^6 - 49*x^5 + 70*x^4 - 49*x^3 + 28*x^2 - 7*x + 1;
Triangle begins:
[0] [1]
[1] [1, -1, 1]
[2] [1, -3, 6, -3, 1]
[3] [1, -7, 28, -49, 70, -49, 28, -7, 1]
[4] [1, -15, 120, -525, 1820, -4095, 8008, -10725, 12870, -10725, 8008, -4095, 1820, -525, 120, -15, 1]
		

Crossrefs

Row sums are 2^(2^n - n - 1) = A016031(n-1).
Central terms of the rows are A037293(n) for n >= 2.
Cf. A340312.

Programs

  • Maple
    A340263_row := proc(n) local a, b;
    if n = 0 then return [1] fi;
    b := n -> add(binomial(2^n, 2*k)*x^(2*k), k = 0..2^n);
    a := n -> x*mul(b(k), k = 0..n);
    expand(b(n) - (2^n-1)*a(n-1));
    [seq(coeff(%, x, j), j = 0..2^n)] end:
    for n from 0 to 5 do A340263_row(n) od;
    # Alternatively:
    CoeffList := p -> [op(PolynomialTools:-CoefficientList(p, x))]:
    Tpoly := n -> ((1-x)^(2^n) + 2^(-n)*((2^n-1)*(x-1)^(2^n) + (x + 1)^(2^n)))/2:
    seq(print(CoeffList(Tpoly(n))), n=0..5); # Peter Luschny, Feb 03 2021
  • SageMath
    def A340263():
        a, b, c = 1, 1, 1
        yield [1]
        while True:
            c *= 2
            a *= b
            b = sum(binomial(c, 2 * k) * x ^ (2 * k) for k in range(c + 1))
            yield ((b - (c - 1) * x * a)).list()
    A340263_row = A340263()
    for _ in range(6):
        print(next(A340263_row))

Formula

Let p_n(x) = b(n) - (2^n-1)*a(n-1), b(n) = Sum_{k=0..2^n} binomial(2^n, 2*k)* x^(2*k), and a(n) = x*Product_{k=0..n} b(k). Then T(n, k) = [x^k] p_n(x).

Extensions

Shorter name by Peter Luschny, Feb 03 2021

A000721 Number of NP-equivalence classes of balanced Boolean functions of n variables.

Original entry on oeis.org

1, 2, 6, 74, 169112, 39785643746726, 37126652766640082937217814348006, 558874591495497577231218517843968898077072559983411918227348931497772
Offset: 1

Views

Author

Keywords

Comments

These are distinct groups of Boolean functions of n variables that output an equal number of 0s and 1s across all possible inputs (balanced), and cannot be transformed into each other by negating or permuting inputs. - Aniruddha Biswas, Nov 12 2024

Examples

			For n = 2 the a(2) = 2. Solutions are f(x,y)=x and f(x,y)=x⊕y; are two 2-variable NP-inequivalent balanced Boolean functions. - _Aniruddha Biswas_, Nov 12 2024
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Formula

a(n) is asymptotic to binomial(2^n, 2^(n-1)) / ( n! * 2^n ) as n -> oo. - Aniruddha Biswas, Dec 16 2024

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Aug 21 2010, Sep 05 2010

A069954 a(n) = binomial(2^(n+1), 2^n)/2 = binomial(2^(n+1) - 1, 2^n) = binomial(2^(n+1) - 1, 2^n-1).

Original entry on oeis.org

1, 3, 35, 6435, 300540195, 916312070471295267, 11975573020964041433067793888190275875, 2884329411724603169044874178931143443870105850987581016304218283632259375395
Offset: 0

Views

Author

Benoit Cloitre, Apr 27 2002

Keywords

Comments

Terms are always odd. a(1) = A061548(2), a(2) = A061548(3), a(3) = A061548(5), a(4) = A061548(9), a(5) = A061548(17), ... Hence it seems that a(n) = A061548(A000051(n)).
C(2*k, k)/2 = C(2*k-1, k) = C(2*k-1, k-1) is odd if and only if k = 2^n. - Michael Somos, Mar 12 2014

Examples

			C(2,1)/2 = C(1,0) = C(1,1) = 1. C(4,2)/2 = C(3,1) = C(3,2) = 3. C(8,4)/2 = C(7,3) = C(7,4) = 35. - _Michael Somos_, Mar 12 2014
		

Crossrefs

Programs

  • Magma
    [Binomial(2^(n+1)-1, 2^n-1): n in [0..10]]; // Vincenzo Librandi, Mar 14 2014
    
  • Mathematica
    Table[Binomial[2^(n+1) -1, 2^n -1], {n, 0, 10}] (* Vincenzo Librandi, Mar 14 2014 *)
  • SageMath
    [binomial(2^(n+1) -1, 2^n) for n in (0..9)] # G. C. Greubel, Aug 16 2022

Formula

From Harry Richman, May 18 2023: (Start)
a(n) = A001790(2^n).
a(n) = 1/2 * A000984(2^n).
a(n) = 1/2 * (2^n + 1) * A000108(2^n).
log log a(n) ~ (log 2) * (n + 1) + log log 2 + O(n / 2^n). (End)
a(n) = A037293(n+1) / 2. - Tilman Piesk, Oct 11 2024

Extensions

a(0) = 1 added by Michael Somos, Mar 12 2014

A080911 a(n) = binomial(n!,(n-1)!).

Original entry on oeis.org

1, 2, 15, 134596, 10872202353646160680764975
Offset: 1

Views

Author

Labos Elemer, Apr 01 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Binomial[n!, (n-1)!], {n, 1, 7}] (* Vaclav Kotesovec, Nov 13 2014 *)

A345135 Number of ordered rooted binary trees with n leaves and with minimal Sackin tree balance index.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 6, 4, 1, 8, 28, 56, 70, 56, 28, 8, 1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1, 32, 496, 4960, 35960, 201376, 906192, 3365856, 10518300, 28048800, 64512240, 129024480, 225792840, 347373600, 471435600
Offset: 0

Views

Author

Mareike Fischer, Jun 09 2021

Keywords

Comments

Ordered rooted binary trees are trees with two descendants per inner node where left and right are distinguished.
The Sackin tree balance index is also known as total external path length.
a(0) = 1 by convention.

Examples

			a(1) = a(2) = 1 because there are only the trees (o) and (o,o) which get counted. a(3) = 2 because the trees ((o,o),o) and (o,(o,o)) get counted. a(4) = 1 because only the tree ((o,o),(o,o)) is counted. Note that the other possible rooted binary ordered trees with four leaves, namely the different orderings of (((o,o),o),o), are not Sackin minimal. a(5) = 4 because the following trees get counted: (((o,o),o),(o,o)), ((o,(o,o)),(o,o)), ((o,o),((o,o),o)), ((o,o),(o,(o,o))).
		

Crossrefs

Programs

  • Maple
    a:= n-> (b-> binomial(b, n-b))(2^ilog2(n)):
    seq(a(n), n=0..46);  # Alois P. Heinz, Jun 09 2021
  • Mathematica
    a[0] := 1; a[n_] := Module[{k = 2^(BitLength[n] - 1)}, Binomial[k, n - k]];
    Table[a[n], {n, 0, 46}]

Formula

a(n) = binomial(2^(ceiling(log_2(n))-1),n-2^(ceiling(log_2(n))-1)).
a(n) = binomial(A053644(n),n-A053644(n)).
a(2^n) = 1.
a(2^n-1) = A011782(n).
a(2^n+1) = A000079(n).
From Alois P. Heinz, Jun 09 2021: (Start)
max({ a(k) | k = 2^n..2^(n+1) }) = A037293(n).
Sum_{i=2^n..2^(n+1)-1} a(i) = 2^(2^n) - 1 = A051179(n). (End)
Conjecture: Sum_{n>=0} a(n)*x^n = 1 + x + Sum_{n>=0} x^(2^n) * ((1 + x)^(2^n) - 1). - Paul D. Hanna, Jul 18 2024

A211600 a(n) = (binomial(p^n, p^(n-1)) - binomial(p^(n-1), p^(n-2))) / p^(3n-3) for p = 2.

Original entry on oeis.org

1, 25, 146745, 55927250376633, 91366371314728099305354933301689, 2750710880016902131123422793322699970110063817946068739768171777481145
Offset: 3

Views

Author

Alexander Adamchuk, Apr 16 2012

Keywords

Comments

Consider the difference between two binomials f(p,k) = binomial(p^k, p^(k-1)) - binomial(p^(k-1), p^(k-2)).
A theorem from the A. I. Shirshov paper (in Russian) states:
p^(3k - 3) divides f(p,k) for prime p = 2 and k > 2.
p^(3k - 2) divides f(p,k) for prime p = 3 and k > 1.
p^(3k - 1) divides f(p,k) for prime p > 3 and k > 1.

Examples

			a(3) = 1 is the difference between central binomials C(8,4) - C(4,2) = 70 - 6 = 64 divided by 2^(3*2 - 3) = 64.
		

References

  • D. B. Fuks and Serge Tabachnikov, Mathematical Omnibus: Thirty Lectures on Classic Mathematics, American Mathematical Society, 2007. Lecture 2. Arithmetical Properties of Binomial Coefficients, pages 27-44

Crossrefs

Programs

  • Maple
    A211600:=n->(binomial(2^n, 2^(n - 1)) - binomial(2^(n - 1), 2^(n - 2))) / 2^(3*n - 3): seq(A211600(n), n=3..9); # Wesley Ivan Hurt, Apr 25 2017
  • Mathematica
    p = 2; Table[(Binomial[p^n, p^(n - 1)] - Binomial[p^(n - 1), p^(n - 2)]) / 2^(3n - 3), {n, 3, 9}]

Formula

a(n) = (binomial(2^n, 2^(n-1)) - binomial(2^(n-1), 2^(n-2))) / 2^(3*n-3).
a(n) = (A037293(n) - A037293(n-1)) / 2^(3*n - 3).

A112884 Number of bits required to represent binomial(2^n, 2^(n-1)).

Original entry on oeis.org

1, 2, 3, 7, 14, 30, 61, 125, 252, 508, 1019, 2043, 4090, 8186, 16377, 32761, 65528, 131064, 262135, 524279, 1048566, 2097142, 4194293, 8388597, 16777204, 33554420, 67108851, 134217715, 268435442, 536870898, 1073741809, 2147483633, 4294967280, 8589934576, 17179869167
Offset: 0

Views

Author

Matt Erbst (matt(AT)erbst.org), Oct 04 2005

Keywords

Examples

			a(2) = 3 because binomial(2^2, 2^1) in binary = 110.
		

Crossrefs

a(n) represents the size of A037293 in binary - see also the central binomial coefficients: A001405.

Programs

  • Mathematica
    Table[IntegerLength[Binomial[2^n,2^(n-1)],2],{n,25}] (* or *)
    CoefficientList[Series[(-2 x^3+3x-2)/((x-1)^2 (2x^2+x-1)), {x,0,25}], x] (* Harvey P. Dale, Apr 06 2011 *)
  • PHP
    $LastFact = gmp_init('1'); for ($i = 2; $i !== 65536; $i *= 2) { $Fact = gmp_fact($i); $Result = gmp_div_q($Fact, gmp_pow($OldFact, 2)); $LastFact = $Fact; echo gmp_strval($Result, 2).'
    '; }

Formula

Appears to be equal to 2^n - floor(n/2) = A000079(n) - A004526(n).
G.f.: (-3*x^3 + 2*x^2 + x - 1)/((x - 1)^2*(2*x^2 + x - 1)). - Conjectured by Harvey P. Dale, Apr 06 2011
a(n) = A070939(A037293(n)). - Alois P. Heinz, Feb 17 2024
The conjectured formula 2^n - floor(n/2) and consequent g.f. are true (see links). - Sela Fried, Oct 03 2024

Extensions

a(0)=1 prepended and g.f. adapted by Alois P. Heinz, Oct 11 2024

A378302 Number of nondegenerate balanced Boolean functions of n variables.

Original entry on oeis.org

0, 2, 2, 58, 12618, 601016690, 1832624137336299922, 23951146041928082853307218802404658090, 5768658823449206338089748357862286887548602533639737369730665340966207267034
Offset: 0

Views

Author

Aniruddha Biswas, Nov 22 2024

Keywords

Comments

A Boolean function is degenerate on some variable if its output does not depend on the variable, and it is said to be non-degenerate if it is not degenerate on any variable.

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[(-1)^(n-i)*Binomial[n,i]*Binomial[2^i,2^(i-1)],{i,n}]; Array[a,9,0] (* Stefano Spezia, Nov 24 2024 *)
  • Python
    from math import comb
    def A378302(n): return sum(-comb(n,i)*comb(1<Chai Wah Wu, Dec 11 2024

Formula

a(n) = Sum_{i=1..n} (-1)^(n-i) * binomial(n,i) * binomial(2^i,2^(i-1)).
Showing 1-10 of 12 results. Next