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-9 of 9 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)).

A050316 a(n) = A050314(2n+1,1): column 1 of triangle.

Original entry on oeis.org

1, 1, 3, 4, 8, 11, 23, 35, 54, 79, 123, 177, 260, 368, 557, 831, 1160, 1677, 2346, 3310, 4545, 6326, 8611, 11799, 15805, 21344, 28352, 37835, 49701, 65730, 86123, 113520, 147322, 193012, 249649, 324677, 418017, 541731, 695399, 894747, 1143262, 1464785, 1864629
Offset: 0

Views

Author

Christian G. Bower, Sep 15 1999

Keywords

Crossrefs

Cf. A050314.

A048833 Number of starting positions of Nim with 2n pieces such that 2nd player wins. Partitions of 2n such that xor-sum of partitions is 0.

Original entry on oeis.org

1, 1, 2, 4, 6, 10, 16, 31, 43, 68, 98, 153, 213, 317, 443, 704, 971, 1415, 1975, 2818, 3865, 5401, 7366, 10142, 13639, 18438, 24583, 32861, 43345, 57268, 75175, 99119, 129278, 168796, 219614, 284887, 368546, 475919, 614379, 788845, 1012117, 1293980, 1654090
Offset: 0

Views

Author

Christian G. Bower, Jun 15 1999

Keywords

Comments

Number of different prime signatures of the 2n-almost primes in A268390. - Peter Munn, Dec 02 2021

Examples

			For n=4 the 6 partitions of 8 are [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2, 2], [2, 2, 2, 2], [1, 1, 1, 2, 3], [1, 1, 3, 3] and [4, 4].
		

Crossrefs

Programs

  • Maple
    read("transforms") : # defines XORnos
    A048833 := proc(n)
        local p, xrs,i,a ;
        if n = 0 then
            return 1 ;
        end if;
        a := 0 ;
        for p in combinat[partition](2*n) do
            xrs := op(1,p) ;
            for i from 2 to nops(p) do
                xrs := XORnos(xrs,op(i,p)) ;
            end do:
            if xrs = 0 then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Apr 29 2022
  • 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}]]];
    a[n_] := Coefficient[b[2n, 2n, 0], x, 0];
    Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Mar 25 2024, after Alois P. Heinz in A050314 *)

Formula

a(n) = A050314(2n, 0): column 0 of triangle.

A235488 Squarefree numbers which yield zero when their prime factors are xored together.

Original entry on oeis.org

70, 646, 1798, 2145, 3526, 5865, 6006, 9177, 11305, 13110, 16422, 20553, 20806, 21489, 23529, 28905, 28985, 30305, 31465, 37961, 38086, 38454, 42441, 44022, 44998, 45353, 45942, 46345, 53985, 54230, 55913, 60630, 60697, 61705, 62049, 64790, 78406, 80934, 81158
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2014

Keywords

Comments

All n for which A008683(n) <> 0 and A072594(n) = 0.
It seems that an analogous case as A072595 for GF(2)[X]-polynomials is just the squares of GF(2)[X]-polynomials (A000695), thus in that ring, the sequence analogous to this one would be empty.
This sequence happens also to encode in the prime factorization of n a certain subset of the Nim game positions that are second-player win.

Examples

			70 is included, as 70 = 2*5*7, whose binary representations are '10', '101' and '111', which when all are xored (cf. A003987) together, cancel all 1-bits, thus yielding zero.
212585 is included, as 212585 = 5*17*41*61, and when we xor their base-2 representations together:
     101
   10001
  101001
  111101
--------
  000000
we get only zeros, because in each column (bit-position), there is an even number of 1-bits.
		

Crossrefs

Intersection of A005117 and A072595 (equally: of A005117 and A072596).

Programs

  • Mathematica
    Select[Range[82000],SquareFreeQ[#]&&BitXor@@FactorInteger[#][[All,1]]==0&] (* Harvey P. Dale, Apr 01 2017 *)
  • PARI
    is(n)=if(n<9, return(0)); my(f=factor(n)); vecmax(f[,2])==1 && fold(bitxor, f[,1])==0 \\ Charles R Greathouse IV, Aug 06 2016

A307431 Number T(n,k) of partitions of n into parts whose bitwise OR 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, 0, 1, 0, 2, 0, 1, 1, 2, 1, 0, 1, 0, 4, 0, 2, 0, 1, 1, 5, 0, 2, 2, 0, 1, 0, 7, 0, 2, 0, 5, 0, 1, 1, 8, 1, 2, 2, 6, 1, 0, 1, 0, 11, 0, 4, 0, 12, 0, 2, 0, 1, 1, 12, 0, 5, 4, 15, 0, 2, 2, 0, 1, 0, 15, 0, 5, 0, 28, 0, 2, 0, 5, 0, 1, 1, 17, 1, 5, 5, 35, 0, 2, 2, 6, 2
Offset: 0

Views

Author

Alois P. Heinz, Apr 08 2019

Keywords

Examples

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

Crossrefs

Columns k=0-1 give: A000007, A057427.
Row sums give: A000041.
Main diagonal gives A050315.
Cf. A050314 (the same for XOR), A307432 (the same for AND).

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[Or](i, k))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):
    seq(T(n), n=0..14);

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);

A233810 Number of starting configurations of Nim with n pieces such that 1st player wins. Partitions of n such that their xor-sum is nonzero.

Original entry on oeis.org

0, 1, 1, 3, 3, 7, 7, 15, 16, 30, 32, 56, 61, 101, 104, 176, 188, 297, 317, 490, 529, 792, 849, 1255, 1362, 1958, 2119, 3010, 3275, 4565, 4900, 6842, 7378, 10143, 10895, 14883, 16002, 21637, 23197, 31185, 33473, 44583, 47773, 63261, 67809, 89134, 95416, 124754, 133634, 173525, 185788, 239943, 257006, 329931, 353294, 451276, 483478, 614154, 657952, 831820, 891292, 1121505, 1201037, 1505499, 1612352, 2012558, 2154724, 2679689, 2868121, 3554345, 3803081, 4697205, 5024237, 6185689, 6613581, 8118264, 8674712, 10619863, 11343319, 13848650, 14784359, 18004327
Offset: 0

Views

Author

Álvar Ibeas, Dec 16 2013

Keywords

Crossrefs

Programs

  • 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]]; a[n_] := Total[Rest[T[n]]]; Table[a[n], {n, 0, 81}] (* Jean-François Alcover, Nov 14 2016, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>0} A050314(n,k). [Row sums of A050314 minus the leftmost term on each row]
a(2n+1) = A000041(2n+1), a(2n) = A000041(2n)-A048833(n).

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

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Apr 11 2019

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 0, 2;
  0, 0, 1, 0, 1;
  0, 1, 0, 0, 0, 2;
  1, 0, 0, 0, 1, 0, 2;
  0, 0, 0, 0, 0, 0, 0, 5;
  0, 0, 0, 0, 1, 0, 4, 0, 1;
  0, 1, 0, 0, 0, 4, 0, 1, 0, 2;
  1, 0, 1, 0, 5, 0, 0, 0, 1, 0, 2;
  ...
		

Crossrefs

Bisection (even part) of column k=0 gives A307506.
Row sums give A000009.
Main diagonal gives A050315.
Cf. A050314.

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-1), Bits[Xor](i, k))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):
    seq(T(n), n=0..14);

Formula

T(n,k) = 0 if n+k is odd.

A370874 Number of partitions of 4n whose xor-sum is 2n.

Original entry on oeis.org

1, 2, 4, 16, 16, 65, 153, 411, 165, 437, 931, 2317, 4802, 10595, 21565, 43211, 5014, 10911, 22466, 44695, 83058, 156147, 286432, 516479, 595305, 1133892, 2111273, 3803940, 6731760, 11653790, 19886537, 33275225, 916662, 1593595, 2753582, 4676617, 7866137
Offset: 0

Views

Author

Alois P. Heinz, Mar 25 2024

Keywords

Examples

			a(0) = 1: the empty partition.
a(1) = 2: 211, 31.
a(2) = 4: 41111, 422, 5111, 62.
a(3) = 16: 42111111, 422211, 4311111, 43221, 4332, 5211111, 52221, 531111, 5322, 6111111, 62211, 6321, 633, 711111, 7221, 732.
a(4) = 16: 811111111, 8221111, 82222, 832111, 83311, 844, 91111111, 922111, 93211, 9331, (10)21111, (10)222, (10)3111, (11)2111, (11)311, (12)4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
         `if`(i<1 or ilog2(k)>ilog2(i), 0, b(n, i-1, k)+
            b(n-i, min(n-i,i), Bits[Xor](i, k))))
        end:
    a:= n-> b(4*n$2, 2*n):
    seq(a(n), n=0..36);

Formula

a(n) = A050314(4n,2n).
Showing 1-9 of 9 results.