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.

Previous Showing 31-40 of 79 results. Next

A075113 a(n) = A000217(n) - A048702(n).

Original entry on oeis.org

0, 0, 0, 1, -1, 0, 4, 7, -7, -6, 0, 3, 13, 18, 28, 35, -35, -34, -24, -21, -5, 0, 14, 21, 43, 52, 70, 81, 105, 118, 140, 155, -155, -154, -136, -133, -105, -100, -78, -71, -35, -26, 0, 11, 47, 60, 90, 105, 151, 168, 202, 221, 265, 286, 324, 347, 399, 424, 466, 493, 545, 574, 620, 651, -651, -650, -616, -613, -561
Offset: 0

Views

Author

Antti Karttunen, Sep 02 2002

Keywords

Comments

The positions of the zeros seem to be given by A000975.

Crossrefs

Programs

  • Mathematica
    A048702 := Join[{0}, Reap[For[k = 1, k < 1500, k += 2, bb = IntegerDigits[k, 2]; If[bb == Reverse[bb], If[EvenQ[Length[bb]], Sow[k/3]]]]][[2, 1]]]; Table[n*(n + 1)/2 - A048702[[n + 1]], {n, 0, 50}] (* G. C. Greubel, Sep 26 2017 *)
  • PARI
    a01(n) = my(f); f = length(binary(n)) - 1; 2^(f+1)*n + sum(i=0, f, bittest(n, i) * 2^(f-i)); \\ A048701
    a(n) = n*(n+1)/2 - a01(n)/3; \\ A006095
    
  • Python
    def A075113(n: int) -> int:
        s = bin(n)[2:]
        return n * (n + 1) // 2 - int(s + s[::-1], 2) // 3
    print([A075113(n) for n in range(69)]) # Peter Luschny, Dec 14 2022

Formula

a(A000225(n)) = ((2^n)-1)*(2^(n-1)) - (2^(2n) - 1)/3 = A006095(n).

Extensions

Definition corrected by Georg Fischer, Dec 13 2022

A171477 a(n) = 6*a(n-1) - 8*a(n-2) + 1 for n > 1; a(0) = 1, a(1) = 7.

Original entry on oeis.org

1, 7, 35, 155, 651, 2667, 10795, 43435, 174251, 698027, 2794155, 11180715, 44731051, 178940587, 715795115, 2863245995, 11453115051, 45812722347, 183251413675, 733006703275, 2932028910251, 11728119835307, 46912487729835
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

a(n) = A006095(n+2).
Second binomial transform of A168642.
Essentially partial sums of A006516.

Crossrefs

Cf. A006095 (Gaussian binomial coefficient [n, 2] for q=2), A168642 ((8*2^n+(-1)^n)/3, a(0)=1), A006516 (2^(n-1)*(2^n-1)), A171472, A171473.

Programs

  • Magma
    [(8*4^n-6*2^n+1)/3: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
  • PARI
    {m=23; v=concat([1, 7], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]+1); v}
    

Formula

a(n) = (8*4^n-6*2^n+1)/3.
G.f.: 1/((1-x)*(1-2*x)*(1-4*x)).
a(n) = A139250(2^(n+1) - 1). - Omar E. Pol, Dec 20 2012

A340312 Triangle read by rows: T(n,k) is the number of subsets of {0..2^n-1} with k elements such that the bitwise-xor of all the subset members gives zero, 0 <= k <= 2^n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 7, 14, 7, 0, 1, 1, 1, 1, 0, 35, 140, 273, 448, 715, 870, 715, 448, 273, 140, 35, 0, 1, 1, 1, 1, 0, 155, 1240, 6293, 27776, 105183, 330460, 876525, 2011776, 4032015, 7063784, 10855425, 14721280, 17678835, 18796230, 17678835, 14721280, 10855425, 7063784, 4032015, 2011776, 876525, 330460, 105183, 27776, 6293, 1240, 155, 0, 1, 1
Offset: 0

Views

Author

Jianing Song, Jan 04 2021

Keywords

Comments

Sum_{k=0..2^n} T(n, k) gives the total number of subsets with bitwise-xor of all the subset members zero. There are in total 2^(2^n - n) such subsets of {0, 1, ..., 2^n-1}, see A300361 and the Mathematics Stack Exchange link below.
Equivalently, T(n, k) is the number of subsets of the vector space (F_2)^n such that the sum of elements in the subset is the zero vector.
T(n, k) is symmetric, that is, T(n, k) = T(n, 2^n-k) for k = 0..2^n, since if the bitwise-xor of the members in S is zero, then the complement of S in {0, 1, ..., 2^n-1} also has this property.

Examples

			Triangle begins:
[0]  1, 1;
[1]  1, 1, 0;
[2]  1, 1, 0, 1, 1;
[3]  1, 1, 0, 7, 14, 7, 0, 1, 1;
[4]  1, 1, 0, 35, 140, 273, 448, 715, 870, 715, 448, 273, 140, 35, 0, 1, 1;
[5]  1, 1, 0, 155, 1240, 6293, 27776, 105183, 330460, 876525, 2011776, 4032015, 7063784, 10855425, 14721280, 17678835, 18796230, 17678835, 14721280, 10855425, 7063784, 4032015, 2011776, 876525, 330460, 105183, 27776, 6293, 1240, 155, 0, 1, 1;
T(n,0) = 1 since the bitwise-xor of all the elements in the empty set is the identity of bitwise-xor (0), hence the empty set meets the requirement.
T(n,1) = 1 since the only such subset is {0}.
T(n,2) = 0 since no distinct a, b have a ^ b = 0.
T(n,3) = A006095(n): if distinct a, b, c have a ^ b ^ c = 0, then c = a ^ b, and a, b must both be nonzero since a = 0 implies b = c. On the other hand, if a, b are nonequal and are both nonzero, then c = a ^ b has c != a and c != b since c = a implies b = 0. So the total number of triples (a, b, c) is (2^n-1)*(2^n-2), and the total number of subsets {a, b, c} is (2^n-1)*(2^n-2)/3! = A006095(n).
T(n,4) = A016290(n-2): if distinct a, b, c, d have a ^ b ^ c ^ d = 0, then d = a ^ b ^ c. On the other hand, if a, b, c are distinct, then d = a ^ b ^ c has d != a, d != b, d != c since d = a implies b = c. So the total number of quadruples (a, b, c, d) is 2^n*(2^n-1)*(2^n-2), and the total number of subsets {a, b, c, d} is 2^n*(2^n-1)*(2^n-2)/4! = A016290(n-2).
		

Crossrefs

Cf. A000120 (hamming weight of n), A300361 (row sums).
Cf. A340263 (irreducible (?) factor if T(n,k) is seen as representing polynomials).
Cf. A340259(n) = T(n, 2^(n-1)), the central term of row n.
Cf. A340030 (case that only nonzero elements allowed).
Cf. A006095 (k=3 column), A016290 (k=4 column); cf. also A010080-A010084 and A281123. - Jon E. Schoenfield, Jan 06 2021

Programs

  • C
    /* Generating program for T(4,k), see link. */
    
  • Maple
    A340312_row := proc(n) local a, b, c; c := 2^(n-1);
    if n = 0 then return [1, 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);
    (x + 1)^c*(b(n-1) - (c-1)*a(n-2));
    [seq(coeff(expand(%), x, j), j = 0..2*c)] end:
    for n from 0 to 6 do A340312_row(n) od; # Peter Luschny, Jan 06 2021
  • Mathematica
    T[n_, k_] := Binomial[2^n, k]/2^n + If[EvenQ[k], (-1)^(k/2)*(1-1/2^n)* Binomial[2^(n-1), k/2], 0];
    Table[T[n, k], {n, 0, 5}, {k, 0, 2^n}] // Flatten (* Jean-François Alcover, Jan 14 2021, after Andrew Howroyd *)
  • PARI
    T(n, k)={binomial(2^n, k)/2^n + if(k%2==0, (-1)^(k/2)*(1-1/2^n)*binomial(2^(n-1), k/2))} \\ Andrew Howroyd, Jan 09 2021
    
  • SageMath
    def A340312():
        a, b, c = 1, 1, 1
        yield [1, 1]
        yield [1, 1, 0]
        while True:
            c *= 2
            a *= b
            b = sum(binomial(c, 2 * k) * x^(2 * k) for k in range(c + 1))
            p = (x + 1)^c * (b - (c - 1) * x * a)
            yield expand(p).list()
    A340312_row = A340312()
    for _ in range(6):
        print(next(A340312_row)) # Peter Luschny, Jan 07 2021

Formula

T(n, k) = [x^k] p(n; x) where p(n; x) = (x + 1)^c*(b(n-1) - (c-1)*a(n-2)), b(n) = Sum_{k=0..2^n} binomial(2^n, 2*k)*x^(2*k), a(n) = x*Product_{k=0..n} b(k) and c = 2^(n-1), for n >= 1. - Peter Luschny, Jan 06 2021
T(n+1, k) = [x^k] (x+1)^(2^n)*p_n(x) where p_n(x) are the polynomials defined in A340263. - Peter Luschny, Jan 06 2021
From Andrew Howroyd, Jan 09 2021: (Start)
First take any subset of k-1 elements and append the bitwise-xor of the elements. The final element will either be a duplicate or not and consideration of the two cases leads to a formula linking T(n,k) and T(n,k-2) with binomial(2^n,k-1).
T(n, k) = (1/k)*(binomial(2^n,k-1) - (2^n-(k-2))*T(n,k-2)) for k >= 2.
T(n, k) = binomial(2^n, k)/2^n for odd k.
T(n, k) = binomial(2^n, k)/2^n + (-1)^(k/2)*(1-1/2^n)*binomial(2^(n-1), k/2) for even k.
T(n, k) = [x^k] ((1+x)^(2^n) + (2^n-1)*(1-x^2)^(2^(n-1)))/2^n.
T(n, k) = A340030(n,k-1) + A340030(n,k).
(End)

Extensions

More terms from Andrew Howroyd and Jon E. Schoenfield.

A006120 Sum of Gaussian binomial coefficients [ n,k ] for q=6.

Original entry on oeis.org

1, 2, 9, 88, 2111, 118182, 16649389, 5547079988, 4671840869691, 9326302435784002, 47100039978152210249, 564020035264998031552848, 17088883834526416216141122391, 1227783027118593811726444427584862, 223195138386683651821176756496371359589
Offset: 0

Views

Author

Keywords

References

  • J. Goldman and G.-C. Rota, The number of subspaces of a vector space, pp. 75-83 of W. T. Tutte, editor, Recent Progress in Combinatorics. Academic Press, NY, 1969.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration. Wiley, NY, 1983, p. 99.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • M. Sved, Gaussians and binomials, Ars. Combinatoria, 17A (1984), 325-351.

Programs

  • Magma
    [n le 2 select n else 2*Self(n-1)+(6^(n-2)-1)*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 13 2016
  • Mathematica
    Flatten[{1,RecurrenceTable[{a[n]==2*a[n-1]+(6^(n-1)-1)*a[n-2],a[0]==1,a[1]==2},a,{n,1,15}]}] (* Vaclav Kotesovec, Aug 21 2013 *)
    Table[Sum[QBinomial[n, k, 6], {k, 0, n}], {n, 0, 20}] (* Vincenzo Librandi, Aug 13 2016 *)

Formula

a(n) = 2*a(n-1)+(6^(n-1)-1)*a(n-2), (Goldman + Rota, 1969). - Vaclav Kotesovec, Aug 21 2013
a(n) ~ c * 6^(n^2/4), where c = EllipticTheta[3,0,1/6]/QPochhammer[1/6,1/6] = 1.656816524577... if n is even and c = EllipticTheta[2,0,1/6]/QPochhammer[1/6,1/6] = 1.630173070572... if n is odd. - Vaclav Kotesovec, Aug 21 2013

A022190 Gaussian binomial coefficients [n, 7] for q = 2.

Original entry on oeis.org

1, 255, 43435, 6347715, 866251507, 114429029715, 14877590196755, 1919209135381395, 246614610741341843, 31627961868755063955, 4052305562169692070035, 518946525150879134496915, 66441249531569955747981459
Offset: 7

Views

Author

N. J. A. Sloane, Jun 14 1998

Keywords

Crossrefs

Gaussian binomial coefficient [n, k] for q = 2: A000225 (k = 1), A006095 (k = 2), A006096 (k = 3), A006097 (k = 4), A006110 (k = 5), A022189 - A022195 (k = 6 thru 12).

Programs

  • Magma
    r:=7; q:=2; [&*[(1-q^(n-i+1))/(1-q^i): i in [1..r]]: n in [r..20]]; // Vincenzo Librandi, Aug 02 2016
    
  • Mathematica
    Table[QBinomial[n, 7, 2], {n, 7, 24}] (* Vincenzo Librandi, Aug 02 2016 *)
  • PARI
    r=7; q=2; for(n=r,30, print1(prod(j=1,r,(1-q^(n-j+1))/(1-q^j)), ", ")) \\ G. C. Greubel, May 30 2018
  • Sage
    [gaussian_binomial(n,7,2) for n in range(7,20)] # Zerinvary Lajos, May 25 2009
    

Formula

G.f.: x^7/((1-x)*(1-2*x)*(1-4*x)*(1-8*x)*(1-16*x)*(1-32*x)*(1-64*x)*(1-128*x)). - Vincenzo Librandi, Aug 07 2016
a(n) = Product_{i=1..7} (2^(n-i+1)-1)/(2^i-1), by definition. - Vincenzo Librandi, Aug 02 2016
G.f. with an offset of 0: exp( Sum_{n >= 1} b(8*n)/b(n)*x^n/n ) = 1 + 255*x + 43435*x^2 + ..., where b(n) = A000225(n) = 2^n - 1. - Peter Bala, Jul 01 2025

Extensions

Changed offset by Vincenzo Librandi, Aug 02 2016

A060484 Number of 6-block tricoverings of an n-set.

Original entry on oeis.org

1, 95, 3107, 75835, 1653771, 34384875, 700030507, 14116715435, 283432939691, 5679127043755, 113683003777707, 2274630646577835, 45502044971338411, 910133025632152235, 18203564201836161707, 364080180268471397035
Offset: 3

Views

Author

Vladeta Jovovic, Mar 20 2001

Keywords

Comments

A covering of a set is a tricovering if every element of the set is covered by exactly three blocks of the covering.

Crossrefs

Programs

  • Mathematica
    With[{c=1/6!},Table[c(20^n-6*10^n-15*8^n+135*4^n-310*2^n+240),{n,3,20}]] (* or *) LinearRecurrence[{45,-720,5220,-17664,25920,-12800},{1,95,3107,75835,1653771,34384875},20] (* Harvey P. Dale, Jan 05 2017 *)
  • PARI
    a(n) = (1/6!)*(20^n - 6*10^n - 15*8^n + 135*4^n - 310*2^n + 240) \\ Andrew Howroyd, Dec 15 2018

Formula

a(n) = (1/6!)*(20^n - 6*10^n - 15*8^n + 135*4^n - 310*2^n + 240).
E.g.f. for k-block tricoverings of an n-set is exp(-x+x^2/2+(exp(y)-1)*x^3/3)*Sum_{k=0..inf}x^k/k!*exp(-1/2*x^2*exp(k*y))*exp(binomial(k, 3)*y).
G.f.: -x^3*(800*x^3+448*x^2-50*x-1) / ((x-1)*(2*x-1)*(4*x-1)*(8*x-1)*(10*x-1)*(20*x-1)). - Colin Barker, Jan 12 2013
a(n) = 45*a(n-1)-720*a(n-2)+5220*a(n-3)-17664*a(n-4)+25920*a(n-5)-12800*a(n-6). - Wesley Ivan Hurt, Oct 18 2021

A060485 Number of 7-block tricoverings of an n-set.

Original entry on oeis.org

43, 4520, 244035, 10418070, 401861943, 14778678180, 530817413155, 18837147108890, 664260814445943, 23345018969140440, 818942064306004275, 28699514624047140510, 1005201938765467579543, 35196266296400319440300
Offset: 4

Views

Author

Vladeta Jovovic, Mar 20 2001

Keywords

Comments

A covering of a set is a tricovering if every element of the set is covered by exactly three blocks of the covering.

Crossrefs

Formula

a(n) = (1/7!)*(35^n - 7*20^n - 21*15^n + 42*10^n + 105*8^n + 105*7^n + 70*5^n - 945*4^n - 525*3^n + 2450*2^n - 1470).
E.g.f. for k-block tricoverings of an n-set is exp(-x+x^2/2+(exp(y)-1)*x^3/3)*Sum_{k=0..infinity}x^k/k!*exp(-1/2*x^2*exp(k*y))*exp(binomial(k, 3)*y).
G.f.: x^4*(27300000*x^7 +9288000*x^6 -17908650*x^5 +6008735*x^4 -796380*x^3 +38552*x^2 +210*x -43) / ((x -1)*(2*x -1)*(3*x -1)*(4*x -1)*(5*x -1)*(7*x -1)*(8*x -1)*(10*x -1)*(15*x -1)*(20*x -1)*(35*x -1)). - Colin Barker, Jan 12 2013

A249993 Expansion of 1/((1+x)*(1+2*x)*(1-4*x)).

Original entry on oeis.org

1, 1, 11, 29, 147, 525, 2227, 8653, 35123, 139469, 559923, 2235597, 8950579, 35785933, 143176499, 572640461, 2290692915, 9162509517, 36650562355, 146601200845, 586406900531, 2345623407821, 9382502019891, 37529991302349, 150119998763827, 600479927946445
Offset: 0

Views

Author

Alex Ratushnyak, Dec 27 2014

Keywords

Crossrefs

Cf. A249992.
Cf. A006095, A171477 for g.f. 1/((1-x)*(1-2*x)*(1-4*x)).
Cf. A015249, A084152, A084175 for g.f. 1/((1-x)*(1+2*x)*(1-4*x)).
Cf. A109765 for g.f. 1/((1+x)*(1-2*x)*(1-4*x)).

Programs

  • Magma
    [(2^(2*n+3) +(-1)^n*(5*2^(n+1)-3))/15: n in [0..40]]; // G. C. Greubel, Oct 10 2022
    
  • Mathematica
    CoefficientList[Series[1/((1+x)(1+2x)(1-4x)),{x,0,30}],x] (* or *) LinearRecurrence[{1,10,8},{1,1,11},30] (* Harvey P. Dale, Dec 13 2018 *)
  • PARI
    Vec(1/((1+x)*(1+2*x)*(1-4*x)) + O(x^40)) \\ Michel Marcus, Dec 28 2014
    
  • SageMath
    [(2^(2*n+3) +(-1)^n*(5*2^(n+1)-3))/15 for n in range(41)] # G. C. Greubel, Oct 10 2022

Formula

G.f.: 1/((1+x)*(1+2*x)*(1-4*x)).
a(n) = ( 2^(3+2*n) + (5*2^(1+n) - 3)*(-1)^n )/15. Colin Barker, Dec 28 2014
a(n) = a(n-1) + 10*a(n-2) + 8*a(n-3). - Colin Barker, Dec 28 2014
E.g.f.: (1/15)*(10*exp(-2*x) - 3*exp(-x) + 8*exp(4*x)). - G. C. Greubel, Oct 10 2022

A359985 Triangle read by rows: T(n,k) is the number of quasi series-parallel matroids on [n] with rank k, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 35, 15, 1, 1, 31, 155, 155, 31, 1, 1, 63, 651, 1365, 651, 63, 1, 1, 127, 2667, 10941, 10941, 2667, 127, 1, 1, 255, 10795, 82215, 156597, 82215, 10795, 255, 1, 1, 511, 43435, 589135, 1988007, 1988007, 589135, 43435, 511, 1
Offset: 0

Views

Author

Andrew Howroyd, Mar 08 2023

Keywords

Comments

A quasi series-parallel matroid is a collection of series-parallel matroids. See the Ferroni/Larson reference for a precise definition.
The first six rows of this triangle are the same as A022166.

Examples

			Triangle begins:
  1;
  1,   1;
  1,   3,    1;
  1,   7,    7,     1;
  1,  15,   35,    15,     1;
  1,  31,  155,   155,    31,    1;
  1,  63,  651,  1365,   651,   63,   1;
  1, 127, 2667, 10941, 10941, 2667, 127, 1;
  ...
		

Crossrefs

Row sums are A359986.
Columns k=0..2 are A000012, A000225, A006095.

Programs

  • PARI
    \\ Proposition 2.3, 2.8 in Ferroni/Larson, compare A140945.
    T(n) = {[Vecrev(p) | p<-Vec(serlaplace(exp(x*(y+1) + y*intformal( serreverse(log(1 + x*y + O(x^n))/y + log(1 + x + O(x^n)) - x)))))]}
    { my(A=T(8)); for(i=1, #A, print(A[i])) }

A006098 Gaussian binomial coefficient [ 2n,n ] for q=2.

Original entry on oeis.org

1, 3, 35, 1395, 200787, 109221651, 230674393235, 1919209135381395, 63379954960524853651, 8339787869494479328087443, 4380990637147598617372537398675, 9196575543360038413217351554014467475, 77184136346814161837268404381760884963259795
Offset: 0

Views

Author

Keywords

References

  • J. Goldman and G.-C. Rota, The number of subspaces of a vector space, pp. 75-83 of W. T. Tutte, editor, Recent Progress in Combinatorics. Academic Press, NY, 1969.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration. Wiley, NY, 1983, p. 99.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • M. Sved, Gaussians and binomials, Ars. Combinatoria, 17A (1984), 325-351.

Crossrefs

Programs

  • Magma
    q:=2; [n le 0 select 1 else (&*[(1-q^(2*n-j))/(1-q^(j+1)): j in [0..n-1]]): n in [0..15]]; // G. C. Greubel, Mar 09 2019
  • Mathematica
    Table[QBinomial[2n,n,2],{n,0,20}] (* Harvey P. Dale, Oct 22 2012 *)
  • PARI
    q=2; {a(n) = prod(j=0, n-1, (1-q^(2*n-j))/(1-q^(j+1))) };
    vector(10, n, n--; a(n)) \\ G. C. Greubel, Mar 09 2019
    
  • Sage
    [gaussian_binomial(2*n,n,2) for n in range(0,11)] # Zerinvary Lajos, May 25 2009
    

Formula

a(n) = A022166(2n,n). - Alois P. Heinz, Mar 30 2016
a(n) ~ c * 2^(n^2), where c = A065446. - Vaclav Kotesovec, Sep 22 2016
a(n) = Sum_{k=0..n} 2^(k^2)*(A022166(n,k))^2. - Werner Schulte, Mar 09 2019

Extensions

More terms from Harvey P. Dale, Oct 22 2012
Previous Showing 31-40 of 79 results. Next