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 17 results. Next

A024166 a(n) = Sum_{1 <= i < j <= n} (j-i)^3.

Original entry on oeis.org

0, 1, 10, 46, 146, 371, 812, 1596, 2892, 4917, 7942, 12298, 18382, 26663, 37688, 52088, 70584, 93993, 123234, 159334, 203434, 256795, 320804, 396980, 486980, 592605, 715806, 858690, 1023526, 1212751, 1428976, 1674992, 1953776, 2268497, 2622522, 3019422
Offset: 0

Views

Author

Keywords

Comments

Convolution of the cubes (A000578) with the positive integers a(n)=n+1, where all sequences have offset zero. - Graeme McRae, Jun 06 2006
a(n) gives the n-th antidiagonal sum of the convolution array A212891. - Clark Kimberling, Jun 16 2012
In general, the r-th successive summation of the cubes from 1 to n is (6*n^2 + 6*n*r + r^2 - r)*(n+r)!/((r+3)!*(n-1)!), n>0. Here r = 2. - Gary Detlefs, Mar 01 2013
The inverse binomial transform is (essentially) row n=2 of A087127. - R. J. Mathar, Aug 31 2022

Examples

			4*a(7) = 6384 = (0*1)^2 + (1*2)^2 + (2*3)^2 + (3*4)^2 + (4*5)^2 + (5*6)^2 + (6*7)^2 + (7*8)^2. - _Bruno Berselli_, Feb 05 2014
		

References

  • Elisabeth Busser and Gilles Cohen, Neuro-Logies - "Chercher, jouer, trouver", La Recherche, April 1999, No. 319, page 97.

Crossrefs

Programs

  • Haskell
    a024166 n = sum $ zipWith (*) [n+1,n..0] a000578_list
    -- Reinhard Zumkeller, Oct 14 2001
    
  • Magma
    [n*(n+1)*(n+2)*(3*n^2 + 6*n + 1)/60: n in [0..30]]; // G. C. Greubel, Nov 21 2017
    
  • Maple
    A024166:=n->n*(n+1)*(n+2)*(3*n^2 + 6*n + 1)/60: seq(A024166(n), n=0..50); # Wesley Ivan Hurt, Nov 21 2017
  • Mathematica
    Nest[Accumulate,Range[0,40]^3,2] (* Harvey P. Dale, Jan 10 2016 *)
    Table[n*(n+1)*(n+2)*(3*n^2 + 6*n + 1)/60, {n,0,30}] (* G. C. Greubel, Nov 21 2017 *)
  • PARI
    a(n)=sum(j=1,n, sum(m=1, j, sum(i=m*(m+1)/2-m+1, m*(m+1)/2, (2*i-1)))) \\ Alexander R. Povolotsky, May 17 2008
    
  • PARI
    for(n=0,30, print1(n*(n+1)*(n+2)*(3*n^2 + 6*n + 1)/60, ", ")) \\ G. C. Greubel, Nov 21 2017

Formula

From Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 29 1999: (Start)
a(n) = Sum_{i=0..n} A000537(i), partial sums of A000537.
a(n) = n*(n+1)*(n+2)*(3*n^2 + 6*n + 1)/60. (End)
a(A004772(n)) mod 2 = 0; a(A016813(n)) mod 2 = 1. - Reinhard Zumkeller, Oct 14 2001
a(n) = Sum_{k=0..n} k^3*(n+1-k). - Paul Barry, Sep 14 2003; edited by Jon E. Schoenfield, Dec 29 2014
a(n) = 2*n*(n+1)*(n+2)*((n+1)^2 + 2*n*(n+2))/5!. This sequence could be obtained from the general formula a(n) = n*(n+1)*(n+2)*(n+3)* ...* (n+k) *(n*(n+k) + (k-1)*k/6)/((k+3)!/6) at k=2. - Alexander R. Povolotsky, May 17 2008
O.g.f.: x*(1 + 4*x + x^2)/(-1 + x)^6. - R. J. Mathar, Jun 06 2008
a(n) = (6*n^2 + 12*n + 2)*(n+2)!/(120*(n-1)!), n > 0. - Gary Detlefs, Mar 01 2013
a(n) = A222716(n+1)/10 = A000292(n)*A100536(n+1)/10. - Jonathan Sondow, Mar 04 2013
4*a(n) = Sum_{i=0..n} A000290(i)*A000290(i+1). - Bruno Berselli, Feb 05 2014
a(n) = Sum_{i=1..n} Sum_{j=1..n} i*j*(n - max(i, j) + 1). - Melvin Peralta, May 12 2016
a(n) = n*binomial(n+3, 4) + binomial(n+2, 5). - Tony Foster III, Nov 14 2017
a(n) = Sum_{i=1..n} i*A143037(n,n-i+1). - J. M. Bergot, Aug 30 2022

A359762 Array read by ascending antidiagonals. T(n, k) = n!*[x^n] exp(x + (k/2) * x^2). A generalization of the number of involutions (or of 'telephone numbers').

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 3, 1, 1, 1, 10, 7, 4, 1, 1, 1, 26, 25, 10, 5, 1, 1, 1, 76, 81, 46, 13, 6, 1, 1, 1, 232, 331, 166, 73, 16, 7, 1, 1, 1, 764, 1303, 856, 281, 106, 19, 8, 1, 1, 1, 2620, 5937, 3844, 1741, 426, 145, 22, 9, 1, 1
Offset: 0

Views

Author

Peter Luschny, Jan 14 2023

Keywords

Comments

The array is a generalization of the number of involutions of permutations on n letters, A000085, also known as 'telephone numbers'. According to Bednarz et al. the telephone number interpretation "is due to John Riordan, who noticed that T(n, 1) is the number of connection patterns in a telephone system with n subscribers."
In graph theory, the n-th telephone number is the total number of matchings of a complete graph K_n (see the Wikipedia entry). Assuming a network with k possibilities of connections leads to a network that can be modeled by a complete multigraph K(n, k). The total number of connection patterns in such a network is given by T(n, k).

Examples

			Array T(n, k) starts:
  [n\k] 0   1      2        3       4        5        6        7
  --------------------------------------------------------------
  [0] 1,    1,     1,       1,      1,       1,       1,       1, ... [A000012]
  [1] 1,    1,     1,       1,      1,       1,       1,       1, ... [A000012]
  [2] 1,    2,     3,       4,      5,       6,       7,       8, ... [A000027]
  [3] 1,    4,     7,      10,     13,      16,      19,      22, ... [A016777]
  [4] 1,   10,    25,      46,     73,     106,     145,     190, ... [A100536]
  [5] 1,   26,    81,     166,    281,     426,     601,     806, ...
  [6] 1,   76,   331,     856,   1741,    3076,    4951,    7456, ...
  [7] 1,  232,  1303,    3844,   8485,   15856,   26587,   41308, ...
  [8] 1,  764,  5937,   21820,  57233,  123516,  234529,  406652, ...
  [9] 1, 2620, 26785,  114076, 328753,  757756, 1510705, 2719900, ...
   [A000085][A047974][A115327][A115329][A115331]
		

References

  • John Riordan, Introduction to Combinatorial Analysis, Dover (2002).

Crossrefs

Programs

  • Maple
    T := (n, k) -> add(binomial(n, j)*doublefactorial(j-1)*k^(j/2), j = 0..n, 2):
    for n from 0 to 9 do lprint(seq(T(n, k), k = 0..7)) od;
    T := (n, k) -> ifelse(k=0, 1, I^(-n)*(2*k)^(n/2)*KummerU(-n/2, 1/2, -1/(2*k))):
    seq(seq(simplify(T(n-k, k)), k = 0..n), n = 0..10);
    T := proc(n, k) exp(x + (k/2)*x^2): series(%, x, 16): n!*coeff(%, x, n) end:
    seq(lprint(seq(simplify(T(n, k)), k = 0..8)), n = 0..9);
    T := proc(n, k) option remember; if n = 0 or n = 1 then 1 else T(n, k-1) +
    n*(k-1)*T(n, k-2) fi end: for n from 0 to 9 do seq(T(n, k), k=0..9) od;
    # Only to check the interpretation as a determinant of a lower Hessenberg matrix:
    gen := proc(i, j, n) local ev, tv; ev := irem(j+i, 2) = 0; tv := j < i and not ev;
    if j > i + 1 then 0 elif j = i + 1 then -1 elif j <= i and ev then 1
    elif tv and i < n then x*(n + 1 - i) - 1 else x fi end:
    det := M -> LinearAlgebra:-Determinant(M):
    p := (n, k) -> subs(x = k, det(Matrix(n, (i, j) -> gen(i, j, n)))):
    for n from 0 to 9 do seq(p(n, k), k = 0..7) od;
  • Mathematica
    T[n_, k_] := Sum[Binomial[n, j] Factorial2[j-1] * If[j==0, 1,  k^(j/2)], {j, 0, n, 2}];
    Table[T[n-k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 25 2023 *)
  • Python
    from math import factorial, comb
    def oddfactorial(n: int) -> int:
        return factorial(2 * n) // (2**n * factorial(n))
    def T(n: int, k: int) -> int:
        return sum(comb(n, 2 * j) * oddfactorial(j) * k**j for j in range(n + 1))
    for n in range(10): print([T(n, k) for k in range(8)])

Formula

T(n, k) = Sum_{j=0..n, j even} binomial(n, j) * (j - 1)!! * k^(j/2).
T(n, k) = T(n, k-1) + n*(k-1)*T(n, k-2) for n >= 2, T(n, 0) = T(n, 1) = 1.
T(n, k) = i^(-n) * (2*k)^(n/2) * KummerU(-n/2, 1/2, -1/(2*k)) for k >= 1, and T(n, 0) = 1.

A222716 Numbers which are both the sum of n+1 consecutive triangular numbers and the sum of the n-1 immediately following triangular numbers.

Original entry on oeis.org

0, 10, 100, 460, 1460, 3710, 8120, 15960, 28920, 49170, 79420, 122980, 183820, 266630, 376880, 520880, 705840, 939930, 1232340, 1593340, 2034340, 2567950, 3208040, 3969800, 4869800, 5926050, 7158060, 8586900, 10235260, 12127510, 14289760, 16749920, 19537760, 22684970, 26225220, 30194220, 34629780, 39571870, 45062680, 51146680
Offset: 1

Views

Author

Jonathan Sondow, Mar 02 2013

Keywords

Comments

The n+1 consecutive triangular numbers start with the A028387(n-2)-th triangular number A000217(n^2-n-1), while the n-1 consecutive triangular numbers start with the A000290(n)-th triangular number A000217(n^2).
Similar sums of consecutive integers are A059270.
Similar sums of consecutive squares are A059255.
Berselli points out that a(n) = 10*A024166(n-1) = A000292(n-1)*(3*n^2 - 2). Since a(n) is a sum of triangular numbers, 10=1+2+3+4 is the 4th triangular number, A024166 is a sum of cubes, and A000292 is a tetrahedral number, is there a geometric proof of Berselli's formula? (Compare Nelsen and Unal's "Proof Without Words: Runs of Triangular Numbers.") [Jonathan Sondow, Mar 04 2013]

Examples

			T(1) + T(2) + T(3) = 1 + 3 + 6 = 10 = T(4) and 4 = 2^2, so a(2) = 10.
T(5) + T(6) + T(7) + T(8) = 15 + 21 + 28 + 36 = 100 = 45 + 55 = T(9) + T(10) and 9 = 3^2, so a(3) = 100.
		

Crossrefs

Programs

  • Mathematica
    Table[ n/6 (2 - 5 n^2 + 3 n^4), {n, 1, 40}]
    LinearRecurrence[{6,-15,20,-15,6,-1},{0,10,100,460,1460,3710},40] (* Harvey P. Dale, Apr 19 2016 *)

Formula

a(n) = T(n^2-n-1)+T(n^2-n)+...+T(n^2-1) = T(n^2)+T(n^2+1)+...+T(n^2+n-2), where T = A000217.
a(n) = (3*n^5 - 5*n^3 + 2*n)/6 = (n-1)*n*(n+1)*(3*n^2 - 2)/6.
G.f.: 10*x^2*(1+4*x+x^2)/(1-x)^6. [Bruno Berselli, Mar 04 2013]
a(n) = -a(-n) = 10*A024166(n-1) = A000292(n-1)*A100536(n). [Bruno Berselli, Mar 04 2013]
a(n) = TP(n^2-1)-TP(n^2-n-2) = TP(n^2+n-2)-TP(n^2-1) = TP(n-1)*(3*n^2-2), where TP = A000292. [Jonathan Sondow, Mar 04 2013]

A162660 Triangle read by rows: coefficients of the complementary Swiss-Knife polynomials.

Original entry on oeis.org

0, 1, 0, 0, 2, 0, -2, 0, 3, 0, 0, -8, 0, 4, 0, 16, 0, -20, 0, 5, 0, 0, 96, 0, -40, 0, 6, 0, -272, 0, 336, 0, -70, 0, 7, 0, 0, -2176, 0, 896, 0, -112, 0, 8, 0, 7936, 0, -9792, 0, 2016, 0, -168, 0, 9, 0, 0, 79360, 0, -32640, 0, 4032, 0, -240, 0, 10, 0
Offset: 0

Views

Author

Peter Luschny, Jul 09 2009

Keywords

Comments

Definition. V_n(x) = (skp(n, x+1) - skp(n, x-1))/2 where skp(n,x) are the Swiss-Knife polynomials A153641. - Peter Luschny, Jul 23 2012
Equivalently, let the polynomials V_n(x) (n>=0) defined by V_n(x) = Sum_{k=0..n} Sum_{v=0..k} (-1)^v*C(k,v)*L(k)*(x+v+1)^n; the sequence L(k) = -1 - H(k-1)*(-1)^floor((k-1)/4) / 2^floor(k/2) if k > 0 and L(0)=0; H(k) = 1 if k mod 4 <> 0, otherwise 0.
(1) V_n(0) = 2^n * Euler(n,1) for n > 0, A155585.
(2) V_n(1) = 1 - Euler(n).
(3) V_{n-1}(0) n / (4^n - 2^n) = B_n gives for n > 1 the Bernoulli numbers A027641/A027642.
(4) V_{n-1}(0) n (2/2^n-2)/(2^n-1) = G_n the Genocchi number A036968 for n > 1.
(5) V_n(1/2)2^{n} - 1 is a signed version of the generalized Euler (Springer) numbers, see A001586.
The Swiss-Knife polynomials (A153641) are complementary to the polynomials defined here. Adding both gives polynomials with e.g.f. exp(x*t)*(sech(t)+tanh(t)), the coefficients of which are a signed variant of A109449.
The Swiss-Knife polynomials as well as the complementary Swiss-Knife polynomials are closely related to the Bernoulli and Euler polynomials. Let F be a sequence and
P_{F}[n](x) = Sum_{k=0..n} Sum_{v=0..k} (-1)^v*C(k,v)*F(k)*(x+v+1)^n.
V_n(x) = P_{F}[n](x) with F(k)=L(k) defined above, are the Co-Swiss-Knife polynomials,
W_n(x) = P_{F}[n](x) with F(k)=c(k) the Chen sequence defined in A153641 are the Swiss-Knife polynomials.
B_n(x) = P_{F}[n](x-1) with F(k)=1/(k+1) are the Bernoulli polynomials,
E_n(x) = P_{F}[n](x-1) with F(k)=2^(-k) are the Euler polynomials.
The most striking formal difference between the Swiss-Knife-type polynomials and the Bernoulli-Euler type polynomials is: The SK-type polynomials have integer coefficients whereas the BE-type polynomials have rational coefficients.
Let R be the exponential Riordan array (exp(x)*sech(x), x) = P * A119879 = 2*P(I + P^2)^(-1) where P denotes Pascal's triangle A007318. Then T = R - I. - Peter Bala, Mar 07 2024

Examples

			Triangle begins:
  [0]    0;
  [1]    1,     0;
  [2]    0,     2,     0;
  [3]   -2,     0,     3,   0;
  [4]    0,    -8,     0,   4,    0;
  [5]   16,     0,   -20,   0,    5,    0;
  [6]    0,    96,     0, -40,    0,    6,    0;
  [7] -272,     0,   336,   0,  -70,    0,    7,  0;
  [8]    0, -2176,     0, 896,    0, -112,    0,  8,  0;
  [9] 7936,     0, -9792,   0, 2016,    0, -168,  0,  9,  0;
		

Crossrefs

V_n(k), n=0, 1, ..., k=0: A155585, k=1: A009832,
V_n(k), k=0, 1, ..., V_0: A000004, V_1: A000012, V_2: A005843, V_3: A100536.

Programs

  • Maple
    # Polynomials V_n(x):
    V := proc(n,x) local k,pow; pow := (n,k) -> `if`(n=0 and k=0,1,n^k); add(binomial(n,k)*euler(k)*pow(x+1,n-k),k=0..n) - pow(x,n) end:
    # Coefficients a(n):
    seq(print(seq(coeff(n!*coeff(series(exp(x*t)*tanh(t),t,16),t,n),x,k),k=0..n)),n=0..8);
  • Mathematica
    skp[n_, x_] := Sum[Binomial[n, k]*EulerE[k]*x^(n-k), {k, 0, n}]; v[n_, x_] := (skp[n, x+1]-skp[n, x-1])/2; t[n_, k_] := Coefficient[v[n, x], x, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 09 2014 *)
  • Sage
    R = PolynomialRing(QQ, 'x')
    @CachedFunction
    def skp(n, x) : # Swiss-Knife polynomials A153641.
        if n == 0 : return 1
        return add(skp(k, 0)*binomial(n, k)*(x^(n-k)-(n+1)%2) for k in range(n)[::2])
    def A162660(n,k) : return 0 if k > n else R((skp(n, x+1)-skp(n, x-1))/2)[k]
    matrix(ZZ, 9, A162660) # Peter Luschny, Jul 23 2012

Formula

T(n, k) = [x^(n-k)](skp(n,x+1)-skp(n,x-1))/2 where skp(n,x) are the Swiss-Knife polynomials A153641. - Peter Luschny, Jul 23 2012
E.g.f. exp(x*t)*tanh(t) = 0*(t^0/0!) + 1*(t^1/1!) + (2*x)*(t^2/2!) + (3*x^2-2)*(t^3/3!) + ...
V_n(x) = -x^n + Sum_{k=0..n} C(n,k)*Euler(k)*(x+1)^(n-k).

A201715 Primes of the form 3*m^2 - 2.

Original entry on oeis.org

73, 241, 673, 1321, 1873, 2521, 3673, 4561, 6073, 11161, 14281, 15121, 19681, 21673, 23761, 24841, 27073, 29401, 33073, 49921, 51481, 54673, 63073, 66601, 72073, 77761, 87721, 91873, 102673, 109441, 114073, 118801, 131041, 143881
Offset: 1

Views

Author

Vincenzo Librandi, Dec 04 2011

Keywords

Comments

Primes p such that 3*(p+2) or (p+2)/3 is a square. - Vincenzo Librandi, Feb 16 2016
m is a member of A063213. - Bruno Berselli, Feb 16 2016

Crossrefs

Programs

  • Magma
    [a: n in [1..300] | IsPrime(a) where a is 3*n^2-2];
  • Mathematica
    Select[Table[3 n^2 - 2, {n, 1, 800}], PrimeQ]

A271713 Numbers n such that 3*n - 5 is a square.

Original entry on oeis.org

2, 3, 7, 10, 18, 23, 35, 42, 58, 67, 87, 98, 122, 135, 163, 178, 210, 227, 263, 282, 322, 343, 387, 410, 458, 483, 535, 562, 618, 647, 707, 738, 802, 835, 903, 938, 1010, 1047, 1123, 1162, 1242, 1283, 1367, 1410, 1498, 1543, 1635, 1682, 1778, 1827, 1927, 1978, 2082, 2135, 2243, 2298
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 12 2016

Keywords

Comments

Quasipolynomial of order 2 and degree 2. - Charles R Greathouse IV, Apr 12 2016
From Ray Chandler, Apr 13 2016: (Start)
Square roots of resulting squares gives A001651.
Sequence is the union of A141631 and A271740. (End)

Examples

			a(3) = 7 because 3*7 - 5 = 16 = 4^2.
		

Crossrefs

Cf. numbers n such that 3*n + k is a square: A120328 (k=-6), this sequence (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), A271675 (k=4), A100536 (k=6).

Programs

Formula

G.f.: x*(2 + x + x^3 + 2*x^4)/((1 - x)^3*(1 + x)^2). - Ilya Gutkovskiy, Apr 12 2016
a(n) = (3/2)*n^2 + O(n). - Charles R Greathouse IV, Apr 12 2016
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5. - Wesley Ivan Hurt, Apr 13 2016

A271675 Numbers m such that 3*m + 4 is a square.

Original entry on oeis.org

0, 4, 7, 15, 20, 32, 39, 55, 64, 84, 95, 119, 132, 160, 175, 207, 224, 260, 279, 319, 340, 384, 407, 455, 480, 532, 559, 615, 644, 704, 735, 799, 832, 900, 935, 1007, 1044, 1120, 1159, 1239, 1280, 1364, 1407, 1495, 1540, 1632, 1679, 1775, 1824, 1924, 1975, 2079, 2132, 2240, 2295, 2407
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 12 2016

Keywords

Comments

7 is the unique prime in this sequence. If m is in this sequence, then 3*m + 4 = k^2 for k is nonzero integer, that is, m = (k^2 - 4)/3 = (k-2)*(k+2)/3. So m can be only prime if one of divisors is prime and another one is 1. Otherwise there should be more than 1 prime divisors, that is n must be composite. - Altug Alkan, Apr 12 2016
From Ray Chandler, Apr 12 2016: (Start)
Square roots of resulting squares gives A001651 (with a different starting point).
Sequence is the union of (positive terms) in A140676 and A270710. (End)
The sequence terms are the exponents in the expansion of Sum_{n >= 0} q^n*(1 - q)*(1 - q^3)*...*(1 - q^(2*n+1)) = 1 - q^4 - q^7 + q^15 + q^20 - q^32 - q^50 + + - - .... - Peter Bala, Dec 19 2024

Examples

			a(4) = 32 because 3*32 + 4 = 100 = 10*10.
		

Crossrefs

Cf. numbers n such that 3*n + k is a square: A120328 (k=-6), A271713 (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), this sequence (k=4), A100536 (k=6).

Programs

  • Magma
    [n: n in [0..4000] | IsSquare(3*n+4)];
    
  • Mathematica
    Select[Range[0,2500], IntegerQ@ Sqrt[3 # + 4] &] (* Michael De Vlieger, Apr 12 2016 *)
    LinearRecurrence[{1,2,-2,-1,1},{0,4,7,15,20},60] (* Harvey P. Dale, Dec 09 2016 *)
  • Python
    from gmpy2 import is_square
    for n in range(0,10**5):
        if(is_square(3*n+4)):print(n)
    # Soumil Mandal, Apr 12 2016

Formula

O.g.f.: x^2*(4 + 3*x - x^3)/((1 + x)^2*(1 - x)^3).
E.g.f.: 1 + (1 - 2*x)*exp(-x)/8 - 3*(3 - 4*x - 2*x^2)*exp(x)/8.
a(n) = A001082(n+1) - 1 = (6*n*(n+1) + (2*n + 1)*(-1)^n - 1)/8 - 1. Therefore: a(2*k+1) = k*(3*k+4), a(2*k) = (k+1)*(3*k-1).
Sum_{n>=2} 1/a(n) = 19/16 - Pi/(4*sqrt(3)). - Amiram Eldar, Jul 26 2024

Extensions

Edited and extended by Bruno Berselli, Apr 12 2016

A361682 Array read by descending antidiagonals. A(n, k) is the number of multiset combinations of {0, 1} whose type is defined in the comments. Also A(n, k) = hypergeom([-k, -2], [1], n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 5, 1, 1, 10, 13, 7, 1, 1, 15, 25, 22, 9, 1, 1, 21, 41, 46, 33, 11, 1, 1, 28, 61, 79, 73, 46, 13, 1, 1, 36, 85, 121, 129, 106, 61, 15, 1, 1, 45, 113, 172, 201, 191, 145, 78, 17, 1, 1, 55, 145, 232, 289, 301, 265, 190, 97, 19, 1
Offset: 0

Views

Author

Peter Luschny, Mar 21 2023

Keywords

Comments

A combination of a multiset M is an unordered selection of k objects of M, where every object can appear at most as many times as it appears in M.
A(n, k) = Cardinality(Union_{j=0..k} Combination(MultiSet(1^[j*n], 0^[(k-j)*n]))), where MultiSet(r^[s], u^[v]) denotes a set that contains the element r with multiplicity s and the element u with multiplicity v; thus the multisets under consideration have n*k elements. Since the base set is {1, 0} the elements can be represented as binary strings. Applying the combination operator to the multisets results in a set of binary strings where '0' resp. '1' can appear at most j*n resp. (k-j)*n times. 'At most' means that they do not have to appear; in other words, the resulting set always includes the empty string ''.
In contrast to the procedure in A361045 we consider here the cardinality of the set union and not the sum of the individual cardinalities. If you want to exclude the empty string, you will find the sequences listed in A361521. The same construction with multiset permutations instead of multiset combinations results in A361043.
A different view can be taken if one considers the hypergeometric representation, hypergeom([-k, -m], [1], n). This is a family of arrays that includes the 'rascal' triangle: the all 1's array A000012 (m = 0), the rascal array A077028 (m = 1), this array (m = 2), and A361731 (m = 3).

Examples

			Array A(n, k) starts:
   [0] 1,  1,   1,    1,   1,   1,   1,    1, ...  A000012
   [1] 1,  3,   6,   10,  15,  21,  28,   36, ...  A000217
   [2] 1,  5,  13,   25,  41,  61,  85,  113, ...  A001844
   [3] 1,  7,  22,   46,  79, 121, 172,  232, ...  A038764
   [4] 1,  9,  33,   73, 129, 201, 289,  393, ...  A081585
   [5] 1, 11,  46,  106, 191, 301, 436,  596, ...  A081587
   [6] 1, 13,  61,  145, 265, 421, 613,  841, ...  A081589
   [7] 1, 15,  78,  190, 351, 561, 820, 1128, ...  A081591
   000012  | A028872 | A239325 |
       A005408    A100536   A069133
.
Triangle T(n, k) starts:
   [0] 1;
   [1] 1,  1;
   [2] 1,  3,   1;
   [3] 1,  6,   5,   1;
   [4] 1, 10,  13,   7,   1;
   [5] 1, 15,  25,  22,   9,   1;
   [6] 1, 21,  41,  46,  33,  11,   1;
   [7] 1, 28,  61,  79,  73,  46,  13,  1;
   [8] 1, 36,  85, 121, 129, 106,  61, 15,  1;
   [9] 1, 45, 113, 172, 201, 191, 145, 78, 17, 1.
.
Row 4 of the triangle:
A(0, 4) =  1 = card('').
A(1, 3) = 10 = card('', 0, 00, 000, 1, 10, 100, 11, 110, 111).
A(2, 2) = 13 = card('', 0, 00, 000, 0000, 1, 10, 100, 11, 110, 1100, 111, 1111).
A(3, 1) =  7 = card('', 0, 00, 000, 1, 11, 111).
A(4, 0) =  1 = card('').
		

Crossrefs

Cf. A239592 (main diagonal), A239331 (transposed array).

Programs

  • Maple
    A := (n, k) -> 1 + n*k*(4 + n*(k - 1))/2:
    for n from 0 to 7 do seq(A(n, k), k = 0..7) od;
    # Alternative:
    ogf := n -> (1 + (n - 1)*x)^2 / (1 - x)^3:
    ser := n -> series(ogf(n), x, 12):
    row := n -> seq(coeff(ser(n), x, k), k = 0..9):
    seq(print(row(n)), n = 0..7);
  • SageMath
    def A(m: int, steps: int) -> int:
        if m == 0: return 1
        size = m * steps
        cset = set()
        for a in range(0, size + 1, m):
            S = [str(int(i < a)) for i in range(size)]
            C = Combinations(S)
            cset.update("".join(i for i in c) for c in C)
        return len(cset)
    def ARow(n: int, size: int) -> list[int]:
        return [A(n, k) for k in range(size + 1)]
    for n in range(8): print(ARow(n, 7))

Formula

A(n, k) = 1 + n*k*(4 + n*(k - 1))/2.
T(n, k) = 1 + k*(n - k)*(4 + k*(n - k - 1))/2.
A(n, k) = [x^k] (1 + (n - 1)*x)^2 / (1 - x)^3.
A(n, k) = hypergeom([-k, -2], [1], n).
A(n, k) = A361521(n, k) + 1.

A143804 Triangle read by rows, thrice the Connell numbers (A001614) - 2.

Original entry on oeis.org

1, 4, 10, 13, 19, 25, 28, 34, 40, 46, 49, 55, 61, 67, 73, 76, 82, 88, 94, 100, 106, 109, 115, 121, 127, 133, 139, 145, 148, 154, 160, 166, 172, 178, 184, 190, 193, 199, 205, 211, 217, 223, 229, 235, 241, 244, 250, 256, 262, 268, 274, 280, 286, 292, 298
Offset: 1

Views

Author

Gary W. Adamson, Sep 01 2008

Keywords

Comments

Right border of the triangle = A100536: (1, 10, 25, 46, 73,...).
Left border = A056107: (1, 4, 13, 28, 49,...).
Row sums = A005915: (1, 14, 57, 148, 305,...).
n-th row = (right border then going to the left): (n-th term of A100536 followed by (n-1) operations of (-6), (-6), (-6),... As a Connell-like triangle, odd row terms are in the subset 6n-5; even row terms are in the set 6n-2.
Row 3 = (13, 19, 25) beginning with A100536(3) = 25 at the right then following the trajectory (-6), (-6).
Using the modular rules, the triangle begins (1; 4, 10; 13, 19, 25;...) since 1 == 6n-5, while 4 is the next higher term in the set 6n-2, then 10 also in the set 6n-2, being an even row.

Examples

			First few rows of the triangle:
  1;
  4, 10;
  13, 19, 25;
  28, 34, 40, 46;
  49, 55, 61, 67, 73;
  76, 82, 88, 94, 100, 106;
  ...
		

Crossrefs

Programs

  • Python
    from math import isqrt
    def A143804(n): return 3*((m:=n<<1)-(k:=isqrt(m))-int(m>=k*(k+1)+1))-2 # Chai Wah Wu, Aug 01 2022

Formula

a(n) = 3*A001614(n) - 2.

A239325 a(n) = 6*n^2 + 8*n + 1.

Original entry on oeis.org

1, 15, 41, 79, 129, 191, 265, 351, 449, 559, 681, 815, 961, 1119, 1289, 1471, 1665, 1871, 2089, 2319, 2561, 2815, 3081, 3359, 3649, 3951, 4265, 4591, 4929, 5279, 5641, 6015, 6401, 6799, 7209, 7631, 8065, 8511, 8969, 9439, 9921, 10415, 10921, 11439, 11969
Offset: 0

Views

Author

Philippe Deléham, Mar 16 2014

Keywords

Comments

Binomial transform of 1, 14, 12, 0, 0, 0 (0 continued).
Sum_{n>=0} 1/a(n) = (Psi(0,(4+sqrt(10))/6) - Psi(0,(4-sqrt(10))/6))/(2*sqrt(10)) = 1.14373625509612753878..., where Psi(n,k) is the n^th derivative of the digamma function. - Bruno Berselli, Mar 16 2014

Examples

			a(0) = 1*1 = 1;
a(1) = 1*1 + 14*1 = 15;
a(2) = 1*1 + 14*2 + 12*1 = 41;
a(3) = 1*1 + 14*3 + 12*3 = 79;
a(4) = 1*1 + 14*4 + 12*6 = 129; etc.
		

Crossrefs

Programs

  • Mathematica
    Table[6 n^2 + 8 n + 1, {n, 0, 44}] (* or *)
    CoefficientList[Series[(1 + 12 x - x^2)/(1 - x)^3, {x, 0, 44}], x] (* Michael De Vlieger, Oct 04 2016 *)
    LinearRecurrence[{3,-3,1},{1,15,41},50] (* Harvey P. Dale, May 11 2019 *)
  • PARI
    a(n)=6*n^2+8*n+1 \\ Charles R Greathouse IV, Jun 17 2017

Formula

G.f.: (1 + 12*x - x^2)/(1-x)^3.
a(0) = 1, a(1) = 15, a(2) = 41; for n>2, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = C(n,0) + 14*C(n,1) + 12*C(n,2).
a(n) = (A069133(n+1) + A100536(n+1) - A000290(n))/2.
a(n) = A139267(n+1) - 1. - Yuriy Sibirmovsky, Oct 04 2016
Showing 1-10 of 17 results. Next