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-10 of 18 results. Next

A014473 Pascal's triangle - 1: Triangle read by rows: T(n, k) = A007318(n, k) - 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 5, 3, 0, 0, 4, 9, 9, 4, 0, 0, 5, 14, 19, 14, 5, 0, 0, 6, 20, 34, 34, 20, 6, 0, 0, 7, 27, 55, 69, 55, 27, 7, 0, 0, 8, 35, 83, 125, 125, 83, 35, 8, 0, 0, 9, 44, 119, 209, 251, 209, 119, 44, 9, 0, 0, 10, 54, 164, 329, 461, 461, 329, 164, 54, 10, 0
Offset: 0

Views

Author

Keywords

Comments

Indexed as a square array A(n,k): If X is an (n+k)-set and Y a fixed k-subset of X then A(n,k) is equal to the number of n-subsets of X intersecting Y. - Peter Luschny, Apr 20 2012

Examples

			Triangle begins:
   0;
   0, 0;
   0, 1,  0;
   0, 2,  2,  0;
   0, 3,  5,  3,  0;
   0, 4,  9,  9,  4,  0;
   0, 5, 14, 19, 14,  5, 0;
   0, 6, 20, 34, 34, 20, 6, 0;
   ...
Seen as a square array read by antidiagonals:
  [0] 0, 0,  0,  0,   0,   0,   0,    0,    0,    0,    0,     0, ... A000004
  [1] 0, 1,  2,  3,   4,   5,   6,    7,    8,    9,   10,    11, ... A001477
  [2] 0, 2,  5,  9,  14,  20,  27,   35,   44,   54,   65,    77, ... A000096
  [3] 0, 3,  9, 19,  34,  55,  83,  119,  164,  219,  285,   363, ... A062748
  [4] 0, 4, 14, 34,  69, 125, 209,  329,  494,  714, 1000,  1364, ... A063258
  [5] 0, 5, 20, 55, 125, 251, 461,  791, 1286, 2001, 3002,  4367, ... A062988
  [6] 0, 6, 27, 83, 209, 461, 923, 1715, 3002, 5004, 8007, 12375, ... A124089
		

Crossrefs

Triangle without zeros: A014430.
Related: A323211 (A007318(n, k) + 1).
A000295 (row sums), A059841 (alternating row sums), A030662(n-1) (central terms).
Columns include A000096, A062748, A062988, A063258.
Diagonals of A(n, n+d): A030662 (d=0), A010763 (d=1), A322938 (d=2).

Programs

  • Haskell
    a014473 n k = a014473_tabl !! n !! k
    a014473_row n = a014473_tabl !! n
    a014473_tabl = map (map (subtract 1)) a007318_tabl
    -- Reinhard Zumkeller, Apr 10 2012
    
  • Magma
    [Binomial(n,k)-1: k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 08 2024
    
  • Maple
    with(combstruct): for n from 0 to 11 do seq(-1+count(Combination(n), size=m), m = 0 .. n) od; # Zerinvary Lajos, Apr 09 2008
    # The rows of the square array:
    Arow := proc(n, len) local gf, ser;
    gf := (x - 1)^(-n - 1) + (-1)^(n + 1)/(x*(x - 1));
    ser := series(gf, x, len+2): seq((-1)^(n+1)*coeff(ser, x, j), j=0..len) end:
    for n from 0 to 9 do lprint([n], Arow(n, 12)) od; # Peter Luschny, Feb 13 2019
  • Mathematica
    Table[Binomial[n,k] -1, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Apr 08 2024 *)
  • SageMath
    flatten([[binomial(n,k)-1 for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Apr 08 2024

Formula

G.f.: x^2*y/((1 - x)*(1 - x*y)*(1 - x*(1 + y))). - Ralf Stephan, Jan 24 2005
T(n,k) = A109128(n,k) - A007318(n,k), 0 <= k <= n. - Reinhard Zumkeller, Apr 10 2012
T(n, k) = T(n-1, k-1) + T(n-1, k) + 1, 0 < k < n with T(n, 0) = T(n, n) = 0. - Reinhard Zumkeller, Jul 18 2015
If seen as a square array read by antidiagonals the generating function of row n is: G(n) = (x - 1)^(-n - 1) + (-1)^(n + 1)/(x*(x - 1)). - Peter Luschny, Feb 13 2019
From G. C. Greubel, Apr 08 2024: (Start)
T(n, n-k) = T(n, k).
Sum_{k=0..floor(n/2)} T(n-k, k) = A129696(n-2).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = b(n-1), where b(n) is the repeating pattern {0, 0, -1, -2, -1, 1, 1, -1, -2, -1, 0, 0}_{n=0..11}, with b(n) = b(n-12). (End)

Extensions

More terms from Erich Friedman

A256117 Number T(n,k) of length 2n words such that all letters of the k-ary alphabet occur at least once and are introduced in ascending order and which can be built by repeatedly inserting doublets into the initially empty word; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 9, 5, 0, 1, 34, 56, 14, 0, 1, 125, 465, 300, 42, 0, 1, 461, 3509, 4400, 1485, 132, 0, 1, 1715, 25571, 55692, 34034, 7007, 429, 0, 1, 6434, 184232, 657370, 647920, 231868, 32032, 1430, 0, 1, 24309, 1325609, 7488228, 11187462, 6191808, 1447992, 143208, 4862
Offset: 0

Views

Author

Alois P. Heinz, Mar 15 2015

Keywords

Comments

In general, column k>2 is asymptotic to (4*(k-1))^n / ((k-2)^2 * (k-2)! * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Jun 01 2015

Examples

			T(0,0) = 1: (the empty word).
T(1,1) = 1: aa.
T(2,1) = 1: aaaa.
T(2,2) = 2: aabb, abba.
T(3,1) = 1: aaaaaa.
T(3,2) = 9: aaaabb, aaabba, aabaab, aabbaa, aabbbb, abaaba, abbaaa, abbabb, abbbba.
T(3,3) = 5: aabbcc, aabccb, abbacc, abbcca, abccba.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,    2;
  0, 1,    9,      5;
  0, 1,   34,     56,     14;
  0, 1,  125,    465,    300,     42;
  0, 1,  461,   3509,   4400,   1485,    132;
  0, 1, 1715,  25571,  55692,  34034,   7007,   429;
  0, 1, 6434, 184232, 657370, 647920, 231868, 32032, 1430;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A057427, A010763(n-1) (for n>1), A258490, A258491, A258492, A258493, A258494, A258495, A258496, A258497.
Main diagonal gives A000108.
T(n+2,n+1) gives A002055(n+5).
Row sums give A258498.
T(2n,n) gives A258499.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, k/n*
          add(binomial(2*n, j)*(n-j)*(k-1)^j, j=0..n-1))
        end:
    T:= (n, k)-> add((-1)^i*A(n, k-i)/(i!*(k-i)!), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n == 0, 1, k/n*Sum[Binomial[2*n, j]*(n - j)*If[j == 0, 1, (k - 1)^j], {j, 0, n - 1}]];
    T[n_, k_] := Sum[(-1)^i*A[n, k - i]/(i!*(k - i)!), {i, 0, k}];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz, updated Jan 01 2021 *)

Formula

T(n,k) = Sum_{i=0..k} (-1)^i * A183135(n,k-i) / (i!*(k-i)!).
T(n,k) = A256116(n,k) / (k-1)! for k > 0.

A061691 Triangle of generalized Stirling numbers.

Original entry on oeis.org

1, 1, 2, 1, 9, 6, 1, 34, 72, 24, 1, 125, 650, 600, 120, 1, 461, 5400, 10500, 5400, 720, 1, 1715, 43757, 161700, 161700, 52920, 5040, 1, 6434, 353192, 2361016, 4116000, 2493120, 564480, 40320, 1, 24309, 2862330, 33731208, 96960024, 97161120, 39372480, 6531840, 362880
Offset: 1

Views

Author

N. J. A. Sloane, Jun 18 2001

Keywords

Comments

The Eulerian-type number triangle associated with this triangle of generalized Stirling numbers is A192721. The table entry T(n,k) gives the number of uniform block permutations of the set {1,2,...,n} partitioned into k blocks. An example is given below. T(n,k) also gives the number of games of simple patience with n cards resulting in k piles (adapt Algorithm 1.1.22 of Lankham). [Peter Bala, Jul 14 2011]

Examples

			Triangle begins:
  1;
  1,2;
  1,9,6;
  1,34,72,24;
  1,125,650,600,120;
  ...
T(4,2) = 34:
There are 7 partitions of the set {1,2,3,4} into 2 blocks. The four partitions {1,2,3}{4}, {1,2,4}{3}, {1,3,4}{2} and {2,3,4}{1} give rise to 4*4 = 16 uniform block permutations while the remaining 3 partitions {1,2}{3,4}, {1,3}{2,4} and {1,4}{2,3} give 2!*3*3 = 18 uniform block permutations : thus in total there are 16+18 = 34 block permutations between the set partitions of {1,2,3,4} into 2 blocks.
		

Crossrefs

Diagonals give A010763, A061690, A000142, A001809, A061689. Cf. A061692. A023998 (row sums), A192721, A192722.

Programs

  • Maple
    #A061691
    #J = sum {n>=0} z^n/n!^2
    J := BesselJ(0, 2*i*sqrt(z)):
    G := exp(x*(J(z)-1)):
    Gser := simplify(series(G, z = 0, 12)):
    for n from 1 to 10 do
    P[n] := n!^2*sort(coeff(Gser, z, n)) od:
    for n from 1 to 10 do seq(coeff(P[n],x,k), k = 1..n) od;
    # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n=0, 1,
          add(x*b(n-i)*binomial(n, i)/i!, i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)/i!, i=1..n))(b(n)*n!):
    seq(T(n), n=1..12);  # Alois P. Heinz, Sep 10 2019
  • Mathematica
    max = 9; g := Exp[x*(BesselI[0, 2*Sqrt[z]] - 1)]; gser = Series[g, {z, 0, max}, {x, 0, max}]; t[n_, k_] := n!^2*SeriesCoefficient[ gser // Normal, {z, 0, n}, {x, 0, k}]; Flatten[ Table[ t[n, k], {n, 1, max}, {k, 1, n}]] (* Jean-François Alcover, Apr 04 2012, after Maple *)

Formula

T(n, k) = 1/k!*Sum multinomial(n, n_1, n_2, ..n_k)^2, where the sum extends over all compositions (n_1, n_2, .., n_k) of n into exactly k nonnegative parts. - Vladeta Jovovic, Apr 23 2003
From Peter Bala, Jul 14 2011: (Start)
The table entry T(n,k) may also be expressed as a sum over (unordered) partitions of n into k parts:
T(n,k) = sum {partitions m_1*1+...+m_n*n = n, m_1+...+m_n = k} 1/(m_1!*...*m_n!)*{n!/(1!^(m_1)*...*n!^(m_n))}^2.
Generating function:
Let J(z) = sum {n>=0} z^n/n!^2. Then
exp(x*(J(z)-1)) = 1 + x*z + (x + 2*x^2)*z^2/2!^2 + (x + 9*x^2 + 6*x^3)*z^3/3!^2 + ....
Relations with other sequences:
T(n,k) = 1/k!*A192722(n,k).
Row sums [1,3,16,131,...] = A023998. (End)
The row polynomials R(n,x) satisfy the recurrence equation R(n,x) = x*( sum {k = 0..n-1} binomial(n,k)*binomial(n-1,k)*R(k,x) ) with R(0,x) = 1. Also R(n,x + y) = sum {k = 0..n} binomial(n,k)^2*R(k,x)*R(n-k,y). - Peter Bala, Sep 17 2013

Extensions

More terms from Vladeta Jovovic, Apr 23 2003

A256116 Number T(n,k) of length 2n k-ary words, either empty or beginning with the first letter of the alphabet and using each letter at least once, that can be built by repeatedly inserting doublets into the initially empty word; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 9, 10, 0, 1, 34, 112, 84, 0, 1, 125, 930, 1800, 1008, 0, 1, 461, 7018, 26400, 35640, 15840, 0, 1, 1715, 51142, 334152, 816816, 840840, 308880, 0, 1, 6434, 368464, 3944220, 15550080, 27824160, 23063040, 7207200
Offset: 0

Views

Author

Alois P. Heinz, Mar 15 2015

Keywords

Examples

			T(3,2) = 9: aaaabb, aaabba, aabaab, aabbaa, aabbbb, abaaba, abbaaa, abbabb, abbbba.
T(3,3) = 10: aabbcc, aabccb, aacbbc, aaccbb, abbacc, abbcca, abccba, acbbca, accabb, accbba.
T(4,2) = 34: aaaaaabb, aaaaabba, aaaabaab, aaaabbaa, aaaabbbb, aaabaaba, aaabbaaa, aaabbabb, aaabbbba, aabaaaab, aabaabaa, aabaabbb, aababbab, aabbaaaa, aabbaabb, aabbabba, aabbbaab, aabbbbaa, aabbbbbb, abaaaaba, abaabaaa, abaababb, abaabbba, ababbaba, abbaaaaa, abbaaabb, abbaabba, abbabaab, abbabbaa, abbabbbb, abbbaaba, abbbbaaa, abbbbabb, abbbbbba.
T(4,4) = 84: aabbccdd, aabbcddc, aabbdccd, aabbddcc, aabccbdd, aabccddb, aabcddcb, aabdccdb, aabddbcc, aabddccb, aacbbcdd, aacbbddc, aacbddbc, aaccbbdd, aaccbddb, aaccdbbd, aaccddbb, aacdbbdc, aacddbbc, aacddcbb, aadbbccd, aadbbdcc, aadbccbd, aadcbbcd, aadccbbd, aadccdbb, aaddbbcc, aaddbccb, aaddcbbc, aaddccbb, abbaccdd, abbacddc, abbadccd, abbaddcc, abbccadd, abbccdda, abbcddca, abbdccda, abbddacc, abbddcca, abccbadd, abccbdda, abccddba, abcddcba, abdccdba, abddbacc, abddbcca, abddccba, acbbcadd, acbbcdda, acbbddca, acbddbca, accabbdd, accabddb, accadbbd, accaddbb, accbbadd, accbbdda, accbddba, accdbbda, accddabb, accddbba, acdbbdca, acddbbca, acddcabb, acddcbba, adbbccda, adbbdacc, adbbdcca, adbccbda, adcbbcda, adccbbda, adccdabb, adccdbba, addabbcc, addabccb, addacbbc, addaccbb, addbbacc, addbbcca, addbccba, addcbbca, addccabb, addccbba.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,    2;
  0, 1,    9,    10;
  0, 1,   34,   112,     84;
  0, 1,  125,   930,   1800,   1008;
  0, 1,  461,  7018,  26400,  35640,  15840;
  0, 1, 1715, 51142, 334152, 816816, 840840, 308880;
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A010763(n-1) for n>0.
Main diagonal gives A065866(n-1) (for n>0).
Row sums give A294603.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, k/n*
          add(binomial(2*n, j) *(n-j) *(k-1)^j, j=0..n-1))
        end:
    T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k)/
        `if`(k=0, 1, k):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    Unprotect[Power]; 0^0 = 1; A[n_, k_] := A[n, k] = If[n==0, 1, k/n*Sum[ Binomial[2*n, j]*(n-j)*(k-1)^j, {j, 0, n-1}]];
    T[n_, k_] := Sum[A[n, k-i]*(-1)^i*Binomial[k, i], {i, 0, k}]/If[k==0, 1, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 22 2017, translated from Maple *)

Formula

T(n,k) = (Sum_{i=0..k} (-1)^i * C(k,i) * A183135(n,k-i)) / A028310(k).
T(n,k) = (k-1)! * A256117(n,k) for k > 0.

A370366 Number A(n,k) of partitions of [k*n] into n sets of size k having no set of consecutive numbers whose maximum (if k>0) is a multiple of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 9, 8, 0, 0, 1, 0, 34, 252, 60, 0, 0, 1, 0, 125, 5672, 14337, 544, 0, 0, 1, 0, 461, 125750, 2604732, 1327104, 6040, 0, 0, 1, 0, 1715, 2857472, 488360625, 2533087904, 182407545, 79008, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Feb 16 2024

Keywords

Examples

			A(2,3) = 9: 124|356, 125|346, 126|345, 134|256, 135|246, 136|245, 145|236, 146|235, 156|234.
Square array A(n,k) begins:
  1, 1,   1,       1,          1,             1, ...
  0, 0,   0,       0,          0,             0, ...
  0, 0,   2,       9,         34,           125, ...
  0, 0,   8,     252,       5672,        125750, ...
  0, 0,  60,   14337,    2604732,     488360625, ...
  0, 0, 544, 1327104, 2533087904, 5192229797500, ...
		

Crossrefs

Columns k=0+1,2-3 give: A000007, A053871, A370357.
Rows n=0-2 give: A000012, A000004, A010763(n-1) for k>0.
Main diagonal gives A370367.
Antidiagonal sums give A370368.

Programs

  • Maple
    A:= proc(n, k) `if`(k=0,`if`(n=0, 1, 0), add(
          (-1)^(n-j)*binomial(n, j)*(k*j)!/(j!*k!^j), j=0..n))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);

Formula

A(n,k) = A060540(n,k) - A370363(n,k) for n,k >= 1.

A260875 Square array read by ascending antidiagonals: number of m-shape complementary Bell numbers.

Original entry on oeis.org

1, 1, -1, 1, -1, 0, 1, -1, 0, -1, 1, -1, 2, 1, 1, 1, -1, 9, -1, 1, -1, 1, -1, 34, -197, -43, -2, 1, 1, -1, 125, -5281, 6841, 254, -9, -1, 1, -1, 461, -123124, 2185429, -254801, 4157, -9, 2, 1, -1, 1715, -2840293, 465693001, -1854147586, -3000807, -70981, 50, -2
Offset: 1

Views

Author

Peter Luschny, Aug 09 2015

Keywords

Comments

A set partition of m-shape is a partition of a set with cardinality m*n for some n >= 0 such that the sizes of the blocks are m times the parts of the integer partitions of n.
M-complementary Bell numbers count the m-shape set partitions which have even length minus the number of such partitions which have odd length.
If m=0 all possible sizes are zero. Thus in this case the complementary Bell numbers count the integer partitions of n into an even number of parts minus the number of integer partitions of n into an odd number of parts (A081362).
If m=1 the set is {1,2,...,n} and the complementary Bell numbers count the set partitions which have even length minus the set partitions which have odd length (A000587).
If m=2 the set is {1,2,...,2n} and the complementary Bell numbers count the set partitions with even blocks which have even length minus the number of partitions with even blocks which have odd length (A260884).

Examples

			[ n ] [ 0   1   2      3        4            5              6]
[ m ] --------------------------------------------------------
[ 0 ] [ 1, -1,  0,    -1,       1,          -1,             1] A081362
[ 1 ] [ 1, -1,  0,     1,       1,          -2,            -9] A000587
[ 2 ] [ 1, -1,  2,    -1,     -43,         254,          4157] A260884
[ 3 ] [ 1, -1,  9,  -197,    6841,     -254801,      -3000807]
[ 4 ] [ 1, -1, 34, -5281, 2185429, -1854147586, 2755045819549]
      A010763,
For example the number of set partitions of {1,2,...,9} with sizes in [9], [6,3] and [3,3,3] are 1, 84, 280 respectively. Thus A(3,3) = -1 + 84 - 280 = -197.
Formatted as a triangle:
[1]
[1, -1]
[1, -1,   0]
[1, -1,   0,    -1]
[1, -1,   2,     1,    1]
[1, -1,   9,    -1,    1,  -1]
[1, -1,  34,  -197,  -43,  -2,  1]
[1, -1, 125, -5281, 6841, 254, -9, -1]
		

Crossrefs

Programs

  • Sage
    def A260875(m, n):
        shapes = ([x*m for x in p] for p in Partitions(n))
        return sum((-1)^len(s)*SetPartitions(sum(s),s).cardinality() for s in shapes)
    for m in (0..4): print([A260875(m,n) for n in (0..6)])

A318253 Coefficient of x of the OmegaPolynomials (A318146), T(n, k) = [x] P(n, k) with n>=1 and k>=0, square array read by ascending antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 0, 1, -2, 0, 0, 1, -9, 16, 0, 0, 1, -34, 477, -272, 0, 0, 1, -125, 11056, -74601, 7936, 0, 0, 1, -461, 249250, -14873104, 25740261, -353792, 0, 0, 1, -1715, 5699149, -2886735625, 56814228736, -16591655817, 22368256, 0, 0, 1, -6434, 132908041, -574688719793, 122209131374375, -495812444583424, 17929265150637, -1903757312, 0
Offset: 1

Views

Author

Peter Luschny, Aug 22 2018

Keywords

Comments

Because in the case n=2 these numbers are the classical signed tangent numbers (A000182) we call T(n, k) also 'generalized tangent numbers' when studied in connection with generalized Bernoulli numbers.

Examples

			[n\k][0  1     2        3              4                   5  ...]
------------------------------------------------------------------
[1]   0, 1,    0,       0,             0,                  0, ...  [A063524]
[2]   0, 1,   -2,      16,          -272,               7936, ...  [A000182]
[3]   0, 1,   -9,     477,        -74601,           25740261, ...  [A293951]
[4]   0, 1,  -34,   11056,     -14873104,        56814228736, ...  [A273352]
[5]   0, 1, -125,  249250,   -2886735625,    122209131374375, ...  [A318258]
[6]   0, 1, -461, 5699149, -574688719793, 272692888959243481, ...
        [A010763]
		

Crossrefs

Programs

  • Maple
    # Prints square array row-wise. The function OmegaPolynomial is defined in A318146.
    for n from 1 to 6 do seq(coeff(OmegaPolynomial(n, k), x, 1), k=0..6) od;
    # In the sequence format:
    0, seq(seq(coeff(OmegaPolynomial(n-k+1, k), x, 1), k=0..n), n=1..9);
    # Alternatively, based on the recurrence of the André numbers:
    ANum := proc(m, n) option remember; if n = 0 then return 1 fi;
    `if`(modp(n, m) = 0, -1, 1);  [seq(m*k, k=0..(n-1)/m)];
    %%*add(binomial(n, k)*ANum(m, k), k in %) end:
    TNum := proc(n,k) if k=1 then 1 elif k=0 or n=1 then 0 else ANum(n, n*k-1) fi end:
    for n from 1 to 6 do seq(TNum(n, k), k = 0..6) od;
  • Mathematica
    OmegaPolynomial[m_, n_] := Module[{S}, S = Series[MittagLefflerE[m, z]^x, {z, 0, 10}]; Expand[(m*n)! Coefficient[S, z, n]]];
    T[n_, k_] := D[OmegaPolynomial[n, k], x] /. x -> 0;
    Table[T[n - k, k], {n, 1, 10}, {k, 0, n - 1}] // Flatten (* Jean-François Alcover, Nov 27 2023 *)
  • Sage
    # Prints the array row-wise. The function OmegaPolynomial is in A318146.
    for m in (1..6):
        print([0] + [list(OmegaPolynomial(m, n))[1] for n in (1..6)])
    # Alternatively, based on the recurrence of the André numbers:
    @cached_function
    def ANum(m, n):
        if n == 0: return 1
        t = [m*k for k in (0..(n-1)//m)]
        s = sum(binomial(n, k)*ANum(m, k) for k in t)
        return -s if m.divides(n) else s
    def TNum(m, n):
        if n == 1: return 1
        if n == 0 or m == 1: return 0
        return ANum(m, m*n-1)
    for m in (1..6): print([TNum(m, n) for n in (0..6)])

Formula

T(n, k) is the derivative of OmegaPolynomial(n, k) evaluated at x = 0.
Apart from the border cases n=1 and k=0 the generalized tangent numbers are a subset of the André numbers A181937; more precisely: T(n, k) is 1 if k = 1 else if k = 0 or n = 1 then T(n, k) = 0 else T(n,k) = (-1)^(n+1)*A181937(n, n*k-1).

A322938 a(n) = binomial(2*n + 2, n + 2) - 1.

Original entry on oeis.org

0, 3, 14, 55, 209, 791, 3002, 11439, 43757, 167959, 646645, 2496143, 9657699, 37442159, 145422674, 565722719, 2203961429, 8597496599, 33578000609, 131282408399, 513791607419, 2012616400079, 7890371113949, 30957699535775, 121548660036299, 477551179875951
Offset: 0

Views

Author

Peter Luschny, Feb 13 2019

Keywords

Crossrefs

Cf. A001791, A014473, A030662 (d=0), A010763 (d=1), this sequence (d=2).

Programs

  • Magma
    [Binomial(2*n+2,n+2) -1: n in [0..30]]; // G. C. Greubel, Apr 22 2024
    
  • Maple
    aList := proc(len) local gf, ser; assume(Im(x) > 0);
    gf := (2*x^2 - x + 1)/(2*(x - 1)*x^2) - (I*(2*x - 1))/(2*x^2*sqrt(4*x - 1));
    ser := series(gf, x, len+4):
    seq(coeff(ser, x, n), n=0..len) end: lprint(aList(25));
  • Mathematica
    Table[Binomial[2 n + 2, n + 2] - 1, {n, 0, 25}]
  • SageMath
    [binomial(2*n+2,n+2) - 1 for n in range(31)] # G. C. Greubel, Apr 22 2024

Formula

Let G(x) = (2*x^2-x+1)/(2*(x-1)*x^2)-(I*(2*x-1))/(2*x^2*sqrt(4*x-1)) with Im(x) > 0, then a(n) = [x^n] G(x). The generating function G(x) satisfies the differential equation 9*x - 16*x^2 + 4*x^3 = (8*x^5 - 22*x^4 + 21*x^3 - 8*x^2 + x)*diff(G(x), x) + (12*x^4 - 36*x^3 + 38*x^2 - 16*x + 2)*G(x).
From Peter Bala, Feb 25 2022: (Start)
a(n) = Sum_{k = 0..n+1} binomial(n+k,k+1).
a(n) = Sum_{k = 0..n-1} binomial(n+k+2,k+1).
More generally, Sum_{k = 0..n+m} binomial(n+k,k+1) = Sum_{k = 0..n-1} binomial(n+k+m+1,k+1) = binomial(2*n+m+1,n) - 1. (End)
a(n) = A001791(n+1) - 1. - Hugo Pfoertner, Feb 26 2022
a(n) = n/(n+2) * binomial(2*n+2, n+1) * Sum_{k = 0..n+1} 1/binomial(n+k+1, k). - Peter Bala, Aug 05 2025

A352027 a(n) = binomial(2*n-1,n) - n*(n-1) - 1.

Original entry on oeis.org

0, 0, 3, 22, 105, 431, 1673, 6378, 24237, 92287, 352605, 1351945, 5200143, 20058117, 77558549, 300539954, 1166802837, 4537567343, 17672631557, 68923264029, 269128936799, 1052049481397, 4116715363293, 16123801840997, 63205303218275, 247959266473401, 973469712823353
Offset: 1

Views

Author

Enrique Navarrete, Feb 28 2022

Keywords

Comments

a(n) is the number of ways to place n indistinguishable balls into n distinguishable boxes with at least 2 boxes remaining empty.
a(n) is also the number of weak compositions of n into n parts in which at least two parts are zero.

Examples

			a(4)=22 since 4 can be written as 3+1+0+0, 0+3+0+1, etc. (12 such compositions); 2+2+0+0 (6 such compositions); 4+0+0+0 (4 such compositions).
		

Crossrefs

Programs

  • Mathematica
    Table[Binomial[2n-1,n]-n(n-1)-1,{n,40}] (* Harvey P. Dale, Dec 03 2022 *)
  • PARI
    a(n) = binomial(2*n-1,n) - n*(n-1) - 1; \\ Michel Marcus, Apr 12 2022

Formula

G.f.: 2*x/(4*x - 1 + sqrt(1 - 4*x)) - (1 - 2*x + 3*x^2)/(1 - x)^3. - Stefano Spezia, Mar 01 2022
D-finite with recurrence n*a(n) +2*(-3*n+2)*a(n-1) +(9*n-14)*a(n-2) +2*(-2*n+5)*a(n-3) +2*(-9*n+22)=0. - R. J. Mathar, Jan 25 2023

A382257 a(n) is the numerator of tanh(Sum_{k=1..n-1} artanh(k/n)), where artanh is the inverse hyperbolic tangent function.

Original entry on oeis.org

0, 1, 9, 17, 125, 461, 1715, 3217, 24309, 92377, 352715, 1352077, 5200299, 20058299, 77558759, 150270097, 1166803109, 4537567649, 17672631899, 68923264409, 269128937219, 1052049481859, 4116715363799, 16123801841549, 63205303218875, 247959266474051, 973469712824055, 3824345300380219, 15033633249770519
Offset: 1

Views

Author

M. F. Hasler, Apr 15 2025

Keywords

Comments

The value of tanh(...) is always a rational number thanks to the relation tanh(x+y) = (tanh x + tanh y)/(1 + (tanh x)*tanh y).
So actually the set of fractions {1/n, ..., (n-1)/n} is "summed up" using the operator x (+) y := (x + y)/(1 + x*y).
By Wolstenholme's theorem; if p > 3 is prime, then p^3 divides a(p). - Thomas Ordowski, Apr 27 2025

Examples

			For n=2, tanh(artanh(1/2)) = 1/2, so a(2) = numerator(1/2) = 1.
For n=3, tanh(artanh(1/3) + artanh(2/3)) = (1/3 + 2/3) / (1 + 1/3 * 2/3) = 9/11, so a(3) = 9.
Numerators of 0, 1/2, 9/11, 17/18, 125/127, 461/463, 1715/1717, 3217/3218, ...
		

Crossrefs

Cf. A001700, A010763, A034602, A383431 (denominators).

Programs

  • PARI
    apply( {A382257(n)=my(s=0); for(i=1, n-1, s=(s*n+i)/(n+s*i));numerator(s)}, [1..30])
  • Python
    from sympy import S,expand_trig as ET
    tanh,artanh = S("tanh, artanh")
    def A382257_test(n): # for illustration only -- slow for n >= 19
        n=S(n); return ET(tanh(sum(artanh(k/n) for k in range(1,n)))).numerator
    def A382257(n):
        s=0; i=S.One/n
        for k in range(1,n): s = (s + i*k)/(1 + s*k*i)
        return s.numerator
    
  • Python
    from functools import reduce
    from fractions import Fraction
    def A382257(n): return reduce(lambda x,y: Fraction(x+y,1+x*y),(Fraction(i,n) for i in range(1,n)),0).numerator # Chai Wah Wu, Apr 23 2025
    

Formula

a(n) = (binomial(2n-1, n-1) - 1)/2 if n = 2^m or a(n) = binomial(2n-1, n-1) - 1 = A010763(n-1) otherwise, since tanh(Sum_{k=1..n-1} artanh(k/n)) = (binomial(2n-1, n-1) - 1)/(binomial(2n-1, n-1) + 1) reduced. - Thomas Ordowski, Apr 27 2025
Showing 1-10 of 18 results. Next