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-3 of 3 results.

A050315 Main diagonal of A050314.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 5, 1, 2, 2, 5, 2, 5, 5, 15, 1, 2, 2, 5, 2, 5, 5, 15, 2, 5, 5, 15, 5, 15, 15, 52, 1, 2, 2, 5, 2, 5, 5, 15, 2, 5, 5, 15, 5, 15, 15, 52, 2, 5, 5, 15, 5, 15, 15, 52, 5, 15, 15, 52, 15, 52, 52, 203, 1, 2, 2, 5, 2, 5, 5, 15, 2, 5, 5, 15, 5, 15, 15, 52, 2, 5, 5, 15, 5, 15
Offset: 0

Views

Author

Christian G. Bower, Sep 15 1999

Keywords

Comments

Also, a(n) is the number of odd multinomial coefficients n!/(k_1!...k_m!) with 1 <= k_1 <= ... <= k_m and k_1 + ... + k_m = n. - Pontus von Brömssen, Mar 23 2018
From Gus Wiseman, Mar 30 2019: (Start)
Also the number of strict integer partitions of n with no binary carries. The Heinz numbers of these partitions are given by A325100. A binary carry of two positive integers is an overlap of the positions of 1's in their reversed binary expansion. For example, the a(1) = 1 through a(15) = 15 strict integer partitions with no binary carries are:
(1) (2) (3) (4) (5) (6) (7) (8) (9) (A) (B) (C) (D) (E) (F)
(21) (41) (42) (43) (81) (82) (83) (84) (85) (86) (87)
(52) (92) (94) (A4) (96)
(61) (A1) (C1) (C2) (A5)
(421) (821) (841) (842) (B4)
(C3)
(D2)
(E1)
(843)
(852)
(861)
(942)
(A41)
(C21)
(8421)
(End)

Crossrefs

Programs

  • Maple
    a:= n-> combinat[bell](add(i,i=convert(n, base, 2))):
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 08 2019
  • Mathematica
    binpos[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&stableQ[#,Intersection[binpos[#1],binpos[#2]]!={}&]&]],{n,0,20}] (* Gus Wiseman, Mar 30 2019 *)
    a[n_] := BellB[DigitCount[n, 2, 1]];
    a /@ Range[0, 100] (* Jean-François Alcover, May 21 2021 *)

Formula

Bell number of number of 1's in binary: a(n) = A000110(A000120(n)).

A050314 Triangle: a(n,k) = number of partitions of n whose xor-sum is k.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 1, 0, 2, 2, 0, 2, 0, 1, 0, 3, 0, 2, 0, 2, 4, 0, 3, 0, 2, 0, 2, 0, 4, 0, 4, 0, 2, 0, 5, 6, 0, 5, 0, 4, 0, 6, 0, 1, 0, 8, 0, 6, 0, 8, 0, 6, 0, 2, 10, 0, 9, 0, 11, 0, 8, 0, 2, 0, 2, 0, 11, 0, 14, 0, 12, 0, 12, 0, 2, 0, 5, 16, 0, 18, 0, 15, 0, 16, 0, 4, 0, 6, 0, 2, 0, 23, 0, 20, 0, 20, 0, 19, 0, 8, 0, 6, 0, 5
Offset: 0

Views

Author

Christian G. Bower, Sep 15 1999

Keywords

Examples

			Triangle: a(n,k) begins:
   1;
   0,  1;
   1,  0,  1;
   0,  1,  0,  2;
   2,  0,  2,  0,  1;
   0,  3,  0,  2,  0,  2;
   4,  0,  3,  0,  2,  0,  2;
   0,  4,  0,  4,  0,  2,  0,  5;
   6,  0,  5,  0,  4,  0,  6,  0, 1;
   0,  8,  0,  6,  0,  8,  0,  6, 0, 2;
  10,  0,  9,  0, 11,  0,  8,  0, 2, 0, 2;
   0, 11,  0, 14,  0, 12,  0, 12, 0, 2, 0, 5;
  16,  0, 18,  0, 15,  0, 16,  0, 4, 0, 6, 0, 2;
  ...
		

Crossrefs

a(2n,0) = A048833(n). a(2n+1,1) = A050316(n). a(n,n) = A050315(n).
Row sums give A000041.
a(4n,2n) gives A370874.

Programs

  • Maple
    with(Bits):
    b:= proc(n, i, k) option remember; `if`(n=0, x^k, `if`(i<1, 0,
          add(b(n-i*j, i-1, `if`(j::even, k, Xor(i, k))), j=0..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Dec 01 2015
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n==0, x^k, If[i<1, 0, Sum[b[n-i*j, i-1, If[EvenQ[j], k, BitXor[i, k]]], {j, 0, n/i}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Jan 24 2016, after Alois P. Heinz *)

A307432 Number T(n,k) of partitions of n into parts whose bitwise AND equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 3, 2, 1, 0, 0, 1, 5, 3, 1, 1, 0, 0, 1, 9, 4, 1, 0, 0, 0, 0, 1, 11, 6, 3, 0, 1, 0, 0, 0, 1, 18, 6, 3, 1, 1, 0, 0, 0, 0, 1, 27, 8, 3, 1, 1, 1, 0, 0, 0, 0, 1, 38, 11, 4, 0, 2, 0, 0, 0, 0, 0, 0, 1, 53, 13, 6, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 08 2019

Keywords

Examples

			T(6,0) = 5: 11112, 1122, 123, 114, 24.
T(6,1) = 3: 111111, 1113, 15.
T(6,2) = 1: 222.
T(6,3) = 1: 33.
T(6,6) = 1: 6.
Triangle T(n,k) begins:
   1;
   0, 1;
   0, 1, 1;
   1, 1, 0, 1;
   1, 2, 1, 0, 1;
   3, 2, 1, 0, 0, 1;
   5, 3, 1, 1, 0, 0, 1;
   9, 4, 1, 0, 0, 0, 0, 1;
  11, 6, 3, 0, 1, 0, 0, 0, 1;
  18, 6, 3, 1, 1, 0, 0, 0, 0, 1;
  27, 8, 3, 1, 1, 1, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Column k=0 gives A307435.
Row sums give A000041.
Main diagonal gives A000012.
Cf. A050314 (the same for XOR), A307431 (the same for OR).

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, x^k, `if`(i<1, 0,
          b(n, i-1, k)+b(n-i, min(n-i, i), Bits[And](i, k))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(
             b(n$2, `if`(n=0, 0, 2^ilog2(2*n)-1))):
    seq(T(n), n=0..14);
Showing 1-3 of 3 results.