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

A357645 Triangle read by rows where T(n,k) is the number of integer compositions of n with half-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 3, 0, 0, 2, 2, 4, 0, 0, 3, 5, 3, 5, 0, 0, 4, 8, 10, 4, 6, 0, 0, 5, 11, 18, 18, 5, 7, 0, 0, 6, 14, 28, 36, 30, 6, 8, 0, 0, 7, 17, 41, 63, 65, 47, 7, 9, 0, 0, 8, 20, 58, 104, 126, 108, 70, 8, 10, 0, 0, 9, 23, 80, 164, 230, 230, 168, 100, 9, 11
Offset: 0

Views

Author

Gus Wiseman, Oct 12 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			Triangle begins:
   1
   0   1
   0   0   2
   0   0   1   3
   0   0   2   2   4
   0   0   3   5   3   5
   0   0   4   8  10   4   6
   0   0   5  11  18  18   5   7
   0   0   6  14  28  36  30   6   8
   0   0   7  17  41  63  65  47   7   9
   0   0   8  20  58 104 126 108  70   8  10
Row n = 6 counts the following compositions:
  (114)   (123)    (132)     (141)  (6)
  (1113)  (213)    (222)     (231)  (15)
  (1122)  (1212)   (312)     (321)  (24)
  (1131)  (1221)   (1311)    (411)  (33)
          (2112)   (2211)           (42)
          (2121)   (3111)           (51)
          (11121)  (11112)
          (11211)  (12111)
                   (21111)
                   (111111)
		

Crossrefs

Row sums are A011782.
For original alternating sum we have A097805, unordered A344651.
Column k = n-4 appears to be A177787.
The case of partitions is A357637, skew A357638.
The central column k=0 is A357641 (aerated).
The skew-alternating version is A357646.
The reverse version for partitions is A357704, skew A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],halfats[#]==k&]],{n,0,10},{k,-n,n,2}]

A357646 Triangle read by rows where T(n,k) is the number of integer compositions of n with skew-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 3, 3, 1, 1, 0, 4, 5, 5, 1, 1, 0, 5, 7, 10, 8, 1, 1, 0, 6, 9, 17, 18, 12, 1, 1, 0, 7, 11, 27, 35, 29, 17, 1, 1, 0, 8, 13, 41, 63, 63, 43, 23, 1, 1, 0, 9, 15, 60, 106, 126, 104, 60, 30, 1, 1, 0, 10, 17, 85, 168, 232, 230, 162, 80, 38, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Oct 12 2022

Keywords

Comments

We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ...

Examples

			Triangle begins:
   1
   0   1
   0   1   1
   0   2   1   1
   0   3   3   1   1
   0   4   5   5   1   1
   0   5   7  10   8   1   1
   0   6   9  17  18  12   1   1
   0   7  11  27  35  29  17   1   1
   0   8  13  41  63  63  43  23   1   1
   0   9  15  60 106 126 104  60  30   1   1
Row n = 6 counts the following compositions:
  (15)   (24)    (33)      (42)     (51)  (6)
  (114)  (213)   (312)     (411)
  (123)  (222)   (321)     (1113)
  (132)  (231)   (1122)    (2112)
  (141)  (1131)  (1212)    (3111)
         (1221)  (2121)    (11112)
         (1311)  (2211)    (11121)
                 (11211)   (21111)
                 (12111)
                 (111111)
		

Crossrefs

The central column k=0 is A001700 (aerated), half A357641.
Row sums are A011782.
For original alternating sum we have A097805, unordered A344651.
The skew-alternating sum of standard compositions is A357623, half A357621.
The case of partitions is A357638, half A357637.
The half-alternating version is A357645.
The reverse version for partitions is A357705, half A357704.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],skats[#]==k&]],{n,0,10},{k,-n,n,2}]

A227161 Number of n X 2 0,1 arrays indicating 2 X 2 subblocks of some larger (n+1) X 3 binary array having a sum of one or less, with rows and columns of the latter in lexicographically nondecreasing order.

Original entry on oeis.org

1, 3, 8, 18, 36, 66, 113, 183, 283, 421, 606, 848, 1158, 1548, 2031, 2621, 3333, 4183, 5188, 6366, 7736, 9318, 11133, 13203, 15551, 18201, 21178, 24508, 28218, 32336, 36891, 41913, 47433, 53483, 60096, 67306, 75148, 83658, 92873, 102831, 113571, 125133
Offset: 0

Views

Author

R. H. Hardin, Jul 03 2013

Keywords

Comments

Also number of binary words with 3 1's and at most n 0's that do not contain the substring 101. a(2) = 8: 111, 0111, 1110, 00111, 10011, 11001, 11100, 01110. - Alois P. Heinz, Jul 18 2013

Examples

			Some solutions for n=4:
..1..0....1..1....1..1....0..0....1..0....1..0....1..0....1..1....1..1....1..1
..0..0....1..1....1..1....0..0....0..0....1..0....1..0....1..1....1..0....1..0
..0..1....1..1....1..0....0..0....0..1....1..0....1..0....1..0....0..0....1..0
..0..0....1..0....0..0....0..1....0..1....1..0....0..0....0..1....0..0....0..0
		

Crossrefs

Column 2 of A227165.
First differences give A177787. - Alois P. Heinz, Jul 18 2013

Formula

Empirical: a(n) = (1/24)*n^4 + (1/12)*n^3 + (23/24)*n^2 + (11/12)*n + 1.
G.f.: -(1-x+x^2)^2/(x-1)^5. - Alois P. Heinz, Jul 18 2013
Binomial transform of (1 + 2x + 3x^2 + 2x^3 + x^4), i.e., of (1 + x + x^2)^2. - Gary W. Adamson, Jan 23 2017

Extensions

a(0) = 1 added by Alois P. Heinz, Jul 18 2013

A381425 Square array A(n,k), n>=0, k>=0, read by antidiagonals downwards, where column k is the expansion of (1 + x/(1-x)^k)^k.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 5, 1, 0, 1, 4, 12, 10, 1, 0, 1, 5, 22, 37, 18, 1, 0, 1, 6, 35, 92, 102, 30, 1, 0, 1, 7, 51, 185, 345, 258, 47, 1, 0, 1, 8, 70, 326, 880, 1188, 606, 70, 1, 0, 1, 9, 92, 525, 1881, 3851, 3796, 1335, 100, 1, 0, 1, 10, 117, 792, 3563, 10002, 15655, 11364, 2781, 138, 1, 0
Offset: 0

Views

Author

Seiichi Manyama, Apr 07 2025

Keywords

Examples

			Square array begins:
  1, 1,  1,   1,    1,     1,     1, ...
  0, 1,  2,   3,    4,     5,     6, ...
  0, 1,  5,  12,   22,    35,    51, ...
  0, 1, 10,  37,   92,   185,   326, ...
  0, 1, 18, 102,  345,   880,  1881, ...
  0, 1, 30, 258, 1188,  3851, 10002, ...
  0, 1, 47, 606, 3796, 15655, 49468, ...
		

Crossrefs

Columns k=0..2 give A000007, A000012, A177787.
Rows n=0..3 give A000012, A001477, A000326, A096000(k-1).
Main diagonal gives A382859.

Programs

  • PARI
    a(n, k) = sum(j=0, k, binomial(k, j)*binomial(n+(k-1)*j-1, n-j));

Formula

A(n,k) = Sum_{j=0..k} binomial(k,j) * binomial(n+(k-1)*j-1,n-j).

A318054 a(n) = n*(n + 1)*(n^2 + n + 22)/24.

Original entry on oeis.org

0, 2, 7, 17, 35, 65, 112, 182, 282, 420, 605, 847, 1157, 1547, 2030, 2620, 3332, 4182, 5187, 6365, 7735, 9317, 11132, 13202, 15550, 18200, 21177, 24507, 28217, 32335, 36890, 41912, 47432, 53482, 60095, 67305, 75147, 83657, 92872, 102830, 113570, 125132, 137557
Offset: 0

Views

Author

Luce ETIENNE, Aug 14 2018

Keywords

Examples

			a(1) = 2; a(2)= 5+2 = 7; a(3) = 10+5+2 = 17; a(4) = 18+10+5+2 = 35; a(5) = 30+18+10+5+2 = 65; a(6) = 47+30+18+10+5+2 = 112.
		

Crossrefs

Partial sums of A177787.

Programs

  • GAP
    List([0..30],n->n*(n+1)*(n^2+n+22)/24); # Muniru A Asiru, Aug 15 2018
    
  • Maple
    seq(coeff(series(x*(2*x^2-3*x+2)/(1-x)^5, x,n+1),x,n),n=0..30); # Muniru A Asiru, Aug 15 2018
  • PARI
    a(n) = n*(n+1)*(n^2+n+22)/24; \\ Michel Marcus, Aug 17 2018

Formula

G.f.: x*(2*x^2-3*x+2)/(1-x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = (1/6)*Sum_{i=1..n} (n-i)*((n-i)^2+11), for n >= 1.

A342385 Triangle T(n,k) read by rows (n >= 0, 0 <= k <= n): first column is A001477 and column k > 0 is k*A028310.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 3, 2, 2, 3, 4, 3, 4, 3, 4, 5, 4, 6, 6, 4, 5, 6, 5, 8, 9, 8, 5, 6, 7, 6, 10, 12, 12, 10, 6, 7, 8, 7, 12, 15, 16, 15, 12, 7, 8, 9, 8, 14, 18, 20, 20, 18, 14, 8, 9, 10, 9, 16, 21, 24, 25, 24, 21, 16, 9, 10, 11, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11
Offset: 0

Views

Author

Paul Curtz, Mar 10 2021

Keywords

Comments

Row sums: A177787(n) with A177787(0) = 0.
First subtriangle: A003991(n+1).
Second subtriangle: A173395(n+1).
A000290(n) is a subsequence via (2*n+1)-th rows.

Examples

			Triangle begins:
  n\k|  0   1   2   3   4   5   6   7   8   9 ...
  ---+-------------------------------------------
   0 |  0;
   1 |  1,  1;
   2 |  2,  1,  2;
   3 |  3,  2,  2,  3;
   4 |  4,  3,  4,  3,  4;
   5 |  5,  4,  6,  6,  4,  5;
   6 |  6,  5,  8,  9,  8,  5,  6;
   7 |  7,  6, 10, 12, 12, 10,  6,  7;
   8 |  8,  7, 12, 15, 16, 15, 12,  7,  8;
   9 |  9,  8, 14, 18, 20, 20, 18, 14,  8,  9;
  ...
		

Crossrefs

Programs

  • Mathematica
    With[{rowmax=10},Table[If[0Paolo Xausa, Nov 15 2023 *)

Formula

From Paolo Xausa, Nov 15 2023: (Start)
T(n,0) = T(n,n) = n.
T(n,k) = k*(n-k), for 0 < k < n. (End)

Extensions

Name edited by Paolo Xausa, Nov 15 2023

A285935 Square array a(n, m) read by antidiagonals whose g.f. is 1 / ((1-x)^2 * (1-y)^2 - x*y).

Original entry on oeis.org

1, 2, 2, 3, 5, 3, 4, 10, 10, 4, 5, 18, 26, 18, 5, 6, 30, 58, 58, 30, 6, 7, 47, 116, 153, 116, 47, 7, 8, 70, 214, 354, 354, 214, 70, 8, 9, 100, 371, 746, 931, 746, 371, 100, 9, 10, 138, 612, 1464, 2204, 2204, 1464, 612, 138, 10, 11, 185, 969, 2714, 4816, 5794
Offset: 0

Views

Author

Michael Somos, Jun 14 2017

Keywords

Examples

			a(n,m) 0   1   2   3
----+--- --- --- ---
0   |  1   2   3   4
1   |  2   5  10  18
2   |  3  10  26  58
3   |  4  18  58 153
		

Crossrefs

Programs

  • Mathematica
    a[n_, m_] := SeriesCoefficient[1/((1-x)^2*(1-y)^2-x*y), {x, 0, n}, {y, 0, m}];
    Table[a[n-m, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Jun 15 2017 *)
  • PARI
    {a(n, m) = if( n<0 || m<0, 0, polcoeff( polcoeff( -1/(x*y-sqr(1-x-y+x*y))*(1+x*O(x^n))*(1+y*O(y^k)), n), m))};

Formula

G.f. Sum_{n>=0, m>=0} a(n, m) * x^n * y^m = 1 / ((1-x)^2 * (1-y)^2 - x*y).
T(n, k) := a(n-k, k) where 0 <= k <= n.
a(n, m) = a(m, n) = T(n+m, n), T(n, 0) = a(n, 0) = n+1, if n>=0, m>=0.
Row sums are (-1)^(n+1) * A113067(n+1).
T(n, 1) = A177787(n+1).
Showing 1-7 of 7 results.