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.

User: Brian Hopkins

Brian Hopkins's wiki page.

Brian Hopkins has authored 13 sequences. Here are the ten most recent ones:

A336996 Triangle of coefficients T(n,k) (n >= 0, 0 <= k <= 2*n), read by rows: n-th row is obtained by expanding (2 + x + x^2)^n.

Original entry on oeis.org

1, 2, 1, 1, 4, 4, 5, 2, 1, 8, 12, 18, 13, 9, 3, 1, 16, 32, 56, 56, 49, 28, 14, 4, 1, 32, 80, 160, 200, 210, 161, 105, 50, 20, 5, 1, 64, 192, 432, 640, 780, 732, 581, 366, 195, 80, 27, 6, 1, 128, 448, 1120, 1904, 2632, 2884, 2674, 2045, 1337, 721, 329, 119, 35, 7, 1
Offset: 0

Author

Brian Hopkins, Aug 10 2020

Keywords

Comments

3-compositions are integer compositions where up to 2 0's are allowed between successive positive parts. T(n,k) is the number of 3-compositions of n+1 having k 0's.
First column counts standard compositions.

Examples

			3-compositions of 2 are 2 and 1+1 with no 0's, 1+0+1 with one 0, and 1+0+0+1 with two 0's.
Triangle T(n, k) begins:
n\k 0   1   2   3   4   5   6   7   8   9 10 11 12
0:  1
1:  2   1   1
2:  4   4   5   2   1
3:  8  12  18  13   9   3   1
4: 16  32  56  56  49  28  14   4   1
5: 32  80 160 200 210 161 105  50  20   5  1
6: 64 192 432 640 780 732 581 366 195  80 27  6  1
		

Crossrefs

Cf. A027907 for (1+x+x^2)^n, A038207 for 2-compositions.

Programs

  • Mathematica
    Table[CoefficientList[(2 + x + x^2)^n, x], {n, 0, 8}]
  • PARI
    row(n) = Vecrev((x^2 + x + 2)^n); \\ Michel Marcus, Aug 14 2020

Formula

T(n,k) = Sum_{m=0..n} binomial(n, m)*trinomial(m, k) using trinomial coefficients as in A027907.
Recurrence: T(0,0) = 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) + 2*T(n-1,k), with T(n,k) = 0 if k < 0 or k > 2*n.
Row sums are powers of 4 (A000302).

A325473 Number of compositions of n with no part divisible by 3 and an even number of parts congruent to 4 or 5 modulo 6.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 22, 38, 67, 120, 217, 395, 722, 1323, 2428, 4460, 8197, 15070, 27711, 50961, 93724, 172377, 317042, 583122, 1072519, 1972660, 3628277, 6673431, 12274342, 22576023, 41523768, 76374104, 140473865, 258371706, 475219643, 874065181, 1607656496
Offset: 0

Author

Brian Hopkins, Sep 06 2019

Keywords

Examples

			a(4) counts (1,1,1,1), (1,1,2), (1,2,1), (2,1,1), (2,2), but not (1,3) or (3,1) since they contain 3, neither (4) since that has an odd number of parts congruent to 4 or 5 mod 6.
		

Crossrefs

Formula

a(n) = (A001590(n+2) + n)/2, see Moser & Whitley reference, Theorem 3.
a(n) = A062544(n-3) + n for n >= 3 (also for n = 1 and 2 with A062544(-2) = A062544(-1) = 0), Moser & Whitney.
G.f.: (x^5-x^4+x^3-x^2+2*x-1)/((x^3+x^2+x-1)*(x-1)^2). - Alois P. Heinz, Sep 06 2019

A309244 Triangle of number of nonsingular n X n matrices over GF(2) by number of ones.

Original entry on oeis.org

1, 0, 2, 4, 0, 0, 6, 36, 72, 36, 18, 0, 0, 0, 24, 288, 1440, 3648, 4752, 4992, 2592, 1728, 600, 96, 0, 0, 0, 0, 120, 2400, 21600, 112800, 369600, 808800, 1384800, 1663200, 1849200, 1466400, 1143840, 636000, 345600, 141600, 45600, 7200, 600, 0, 0, 0, 0, 0, 720
Offset: 1

Author

Brian Hopkins, Jul 17 2019

Keywords

Comments

The row for n begins with n-1 zeros since a matrix with fewer than n ones has an all-zero row.
The last entry in the row for n is T(n, n^2-n+1) as a matrix with more than n^2-n+1 ones must have two identical rows.
Each entry in the row for n is a multiple of n! since rows must be distinct.

Examples

			T(2,3) = 4 from the 2 X 2 nonsingular matrices (1,1;1,0), (1,1;0,1), (1,0;1,1), and (0,1;1,1) which each have 3 ones.
Triangle begins
1
0 2 4
0 0 6 36  72   36   18
0 0 0 24 288 1440 3648 4752 4992 2592 1728 600 96
		

Crossrefs

Row sums are A002884.

Formula

T(n, n) = n!, T(n, n+1) = n!*n*(n-1), T(n, n^2-n+1) = n!*n (Weg, see Mathoverflow link).

A297626 Triangle read by rows in which row n gives a partition of n with the most subpartitions.

Original entry on oeis.org

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

Author

Brian Hopkins, Jan 04 2018

Keywords

Comments

A partition and its conjugate have the same number of subpartitions; in the case of ties, we take the lexicographically earliest partition.

Examples

			Triangle begins
1
2
2 1
3 1
3 1 1
3 2 1
4 2 1
4 2 1 1
5 2 1 1
5 3 1 1
5 3 2 1
5 3 2 1 1
6 3 2 1 1
6 3 2 1 1 1
6 4 2 1 1 1
6 4 2 2 1 1
6 4 3 2 1 1
7 4 3 2 1 1
7 4 3 2 1 1 1
7 5 3 2 1 1 1
8 5 3 2 1 1 1
8 5 3 2 2 1 1
8 5 3 2 2 1 1 1
9 5 3 2 2 1 1 1
8 5 4 3 2 1 1 1
9 5 4 3 2 1 1 1
9 6 4 3 2 1 1 1
9 6 4 3 2 1 1 1 1
9 6 4 3 2 2 1 1 1
		

Crossrefs

A286097 Number of partitions of n such that each part is no more than 4 more than the sum of all smaller parts.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 13, 20, 26, 37, 48, 68, 86, 119, 152, 204, 258, 342, 428, 560, 698, 897, 1114, 1421, 1748, 2210, 2712, 3390, 4140, 5140, 6240, 7702, 9314, 11402, 13741, 16742, 20071, 24333, 29087, 35056, 41770, 50137, 59503, 71148, 84195, 100213, 118275, 140307, 165041, 195139
Offset: 0

Author

Brian Hopkins, May 16 2017

Keywords

Comments

Generalization of Adams-Watters's criterion for complete partitions, that each part is no more than 1 more than the sum of all smaller parts.

Examples

			For n = 8, a(8) = 20 counts all partitions of 8 except (8) and (7,1).
		

Crossrefs

Cf. A126796.

Programs

  • Mathematica
    Table[Count[IntegerPartitions@n, w_ /; And[Last@w <= 4, NoneTrue[ w - Rest@  PadRight[4 + Reverse@Accumulate@Reverse@w, Length@w + 1, Last@w], # > 0 &]]], {n, 50}] (* George Beck, May 17 2017, Version 11.1.1, adapted from A286929 *)

Formula

a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n). - Vaclav Kotesovec, May 24 2018

A286929 Number of partitions of n such that each part is no more than 3 more than the sum of all smaller parts.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 13, 17, 25, 33, 46, 61, 84, 108, 147, 187, 248, 316, 414, 519, 675, 843, 1077, 1339, 1699, 2090, 2633, 3227, 4020, 4909, 6076, 7369, 9075, 10965, 13394, 16129, 19613, 23493, 28434, 33954, 40858, 48643, 58301, 69124, 82547, 97593, 116017, 136804, 162101, 190504
Offset: 0

Author

Brian Hopkins, May 16 2017

Keywords

Comments

Generalization of Adams-Watters's criterion for complete partitions, that each part is no more than 1 more than the sum of all smaller parts.
Also the number of complete partitions of n+1 that contain more than one 1. - George Beck, Oct 01 2017

Examples

			For n = 8, a(8) = 17 counts all partitions of 8 except (8), (7,1), (6,2), (6,1,1), and (4,4).
		

Crossrefs

Cf. A126796.

Programs

  • Mathematica
    Table[Count[IntegerPartitions@ n, w_ /; And[Last@ w <= 3, NoneTrue[w - Rest@ PadRight[3 + Reverse@ Accumulate@ Reverse@ w, Length@ w + 1, Last@ w], # > 0 &]]], {n, 50}] (* Michael De Vlieger, May 16 2017, Version 10 *)

Formula

a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n). - Vaclav Kotesovec, May 24 2018

A263454 Number of starting positions of misère Kayles with n pieces such that the 2nd player can win (P-positions).

Original entry on oeis.org

1, 0, 1, 2, 1, 5, 1, 6, 10, 8, 13, 18, 20, 34, 27, 48, 55, 76, 76, 113, 132, 173, 193, 253, 296, 394, 440, 558, 657, 860, 943, 1212, 1410, 1755, 2070
Offset: 1

Author

Brian Hopkins, Oct 18 2015

Keywords

Examples

			For n = 6 the a(6) = 5 P-positions are (5,1), (4,1,1), (3,3), (3,2,1), and (2,2,1,1).
		

Crossrefs

A263453 Number of starting positions of Kayles with n pieces such that the 2nd player can win (P-positions).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 4, 1, 6, 7, 9, 9, 17, 17, 30, 25, 44, 49, 74, 67, 109, 125, 164, 188, 245, 285, 390, 424, 551, 645, 847, 933, 1199, 1393, 1747, 2047, 2463, 2893, 3622, 4161, 5016, 5863, 7203, 8282, 9973, 11533, 13927, 16300, 19095, 22213, 26645, 30823, 36166
Offset: 0

Author

Brian Hopkins, Oct 18 2015

Keywords

Comments

The partition p = (p_1,...,p_k) is counted if the Nimsum of the A002186(p_i) is 0.

Examples

			For n = 6 the a(6) = 4 P-positions are (3,3), (3,2,1), (2,2,1,1), and (1,1,1,1,1,1).
		

Crossrefs

Extensions

a(0) and more terms from Eric M. Schmidt, Jan 11 2017

A257542 Square-sum pairs: Numbers n such that 0,1, ..., 2n-1 can be partitioned into n pairs, where each pair adds up to a perfect square.

Original entry on oeis.org

1, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75
Offset: 1

Author

Brian Hopkins, Apr 28 2015

Keywords

Comments

Kilkelly uses induction to prove that all integers greater than 20 are in the sequence after using various methods on smaller cases.
The positive integers except 2, 3, and 6.
The positive integers except the strong divisors of 6. - Omar E. Pol, Apr 30 2015

Examples

			For n = 4: (0, 1), (2, 7), (3, 6), (4, 5)
For n = 7: (0, 9), (1, 8), (2, 7), (3, 13), (4, 12), (5, 11), (6, 10)
		

References

  • T. Kilkelly, The ARML Power Contest, American Mathematical Society, 2015, chapter 11.

Crossrefs

Essentially the same as A055495.

Programs

Formula

From Chai Wah Wu, Aug 13 2020: (Start)
a(n) = 2*a(n-1) - a(n-2) for n > 5.
G.f.: x*(-x^4 + x^3 - 2*x^2 + 2*x + 1)/(x - 1)^2. (End)

A217447 Number of n x n permutation matrices that disconnect their zeros.

Original entry on oeis.org

2, 6, 12, 32, 120, 580, 3392, 23244, 182776, 1622468, 16045200, 174894172, 2082824744, 26902998516, 374570250688, 5591767768460, 89095070783832, 1509041577895204, 27073887615758576, 512898265609845948, 10230945527263709320, 214337863242231108692
Offset: 2

Author

Brian Hopkins, Nov 16 2012

Keywords

Examples

			The matrix corresponding to {4,3,1,2} disconnects its zeros since the 0 in the bottom left is not horizontally or vertically adjacent to another 0. In contrast, the matrix corresponding to {4,2,1,3} connects its zeros.
		

Crossrefs

Terms from A007489 in formula.

Programs

  • Mathematica
    Table[4*Sum[i!, {i, n - 2}] - 2*(n - 2)*Sum[i!, {i, 0, n - 4}] + 2*Sum[i!, {i, n - 3}] + 2, {n, 2, 25}] (* T. D. Noe, Nov 16 2012 *)

Formula

a(n) = 4 Sum_{i=1..n-2} i! - 2(n-2) Sum_{i=0..n-4} i! + 2 Sum_{i=1..n-3} i! + 2.
Conjecture: 2*a(n) + 2*(-n-1)*a(n-1) + (6*n-11)*a(n-2) + (-5*n+14)*a(n-3) + 3*a(n-4) + (n-6)*a(n-5) = 0. - R. J. Mathar, Nov 30 2012
Recurrence (for n>4): (2*n^2 - 16*n + 31)*a(n) = (2*n^3 - 16*n^2 + 33*n - 6)*a(n-1) - (2*n-7)*(2*n^2 - 12*n + 15)*a(n-2) + (n-4)*(2*n^2 - 12*n + 17)*a(n-3). - Vaclav Kotesovec, Jan 31 2014
a(n) ~ 4 * (n-2)!. - Vaclav Kotesovec, Jan 31 2014