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.

Previous Showing 61-70 of 90 results. Next

A274228 Triangle read by rows: T(n,k) (n>=3, 0<=k<=n-3) = number of n-sequences of 0's and 1's with exactly one pair of adjacent 0's and exactly k pairs of adjacent 1's.

Original entry on oeis.org

2, 3, 2, 4, 4, 2, 5, 8, 5, 2, 6, 12, 12, 6, 2, 7, 18, 21, 16, 7, 2, 8, 24, 36, 32, 20, 8, 2, 9, 32, 54, 60, 45, 24, 9, 2, 10, 40, 80, 100, 90, 60, 28, 10, 2, 11, 50, 110, 160, 165, 126, 77, 32, 11, 2, 12, 60, 150, 240, 280, 252, 168, 96, 36, 12, 2, 13, 72, 195, 350, 455, 448, 364, 216, 117, 40, 13, 2
Offset: 3

Views

Author

Jeremy Dover, Jun 14 2016

Keywords

Examples

			n=3 => 100, 001 -> T(3,0) = 2.
n=4 => 0010, 0100, 1001 -> T(4,0) = 3; 0011, 1100 -> T(4,1) = 2.
Triangle starts:
2,
3, 2,
4, 4, 2,
5, 8, 5, 2,
6, 12, 12, 6, 2,
7, 18, 21, 16, 7, 2,
8, 24, 36, 32, 20, 8, 2,
9, 32, 54, 60, 45, 24, 9, 2,
10, 40, 80, 100, 90, 60, 28, 10, 2,
11, 50, 110, 160, 165, 126, 77, 32, 11, 2,
12, 60, 150, 240, 280, 252, 168, 96, 36, 12, 2,
13, 72, 195, 350, 455, 448, 364, 216, 117, 40, 13, 2,
...
		

Crossrefs

Row sums give A001629.
Cf. A073044.
Columns of table:
T(n,0)=A000027(n-1)
T(n,1)=A007590(n-1)
T(n,2)=A080838(n-1)
T(n,3)=A032091(n)

Programs

  • Mathematica
    Table[(k + 1) (Binomial[Floor[(n + k - 2)/2], k + 1] + Binomial[Floor[(n + k - 3)/2], k + 1]) + 2 Binomial[Floor[(n + k - 3)/2], k], {n, 3, 14}, {k, 0, n - 3}] // Flatten (* Michael De Vlieger, Jun 16 2016 *)
  • PARI
    T(n,k) = (k+1)*(binomial((n+k-2)\2,k+1)+binomial((n+k-3)\2,k+1))+2*binomial((n+k-3)\2,k); \\ Michel Marcus, Jun 17 2016

Formula

T(n,k) = (k+1)*(binomial(floor((n+k-2)/2),k+1)+binomial(floor((n+k-3)/2),k+1))+2*binomial(floor((n+k-3)/2),k).
T(n,k) = (k+1)*A073044(n-2,k+1) + 2*A046854(n-3,k).
T(n,k) = A274742(n,k)+A274742(n-1,k)+A046854(n-3,k).

A307707 Lexicographically earliest sequence of nonnegative integers in which, for all k >= 0, there are exactly k pairs of consecutive terms whose sum is k.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Apr 23 2019

Keywords

Comments

The old definition was "Lexicographically earliest sequence starting with a(1) = 0 such that a(n) is the number of pairs of contiguous terms whose sum is a(n)".
From Paul Curtz, Apr 27 2019: This can be written as a triangle:
0
1 1
1 2 1
2 2 2 2
2 3 2 3 2
3 3 3 3 3 3
3 4 3 4 3 4 3
...

Crossrefs

Cf. A002024.
Cf. also A007590, A057353, A106466 and A238410.
For other versions see A307720 and A378117.

Programs

  • Mathematica
    m = 107; a[1]=0;
    a24[n_] := Ceiling[(Sqrt[8n+1]-1)/2];
    Array[a, m] /. Solve[Table[a[n] + a[n+1] == a24[n], {n, 1, m-1}]][[1]] (* Jean-François Alcover, Jun 02 2019, after Rémy Sigrist's formula *)
  • PARI
    v=0; rem=wanted=1; for (n=1, 107, print1 (v", "); v=wanted-v; if (rem--==0, rem=wanted++)) \\ Rémy Sigrist, Apr 23 2019

Formula

a(n) + a(n+1) = A002024(n). - Rémy Sigrist, Apr 24 2019
Let t_m = m*(m+1)/2. Write n = t_m - i with m >= 1 and 0 <= i < m. Then a(n) = m/2 if m is even, or if m is odd, a(n) = (m-1)/2 + (i-1 mod 2). - N. J. A. Sloane, Nov 16 2024

Extensions

Definition clarified by Rémy Sigrist and N. J. A. Sloane, Nov 17 2024

A355509 Peaceable coexisting armies of knights: a(n) is the maximum number m such that m white knights and m black knights can coexist on an n X n chessboard without attacking each other.

Original entry on oeis.org

0, 2, 3, 6, 10, 14, 18, 24, 32, 40, 50, 60, 72, 84, 98, 112, 128, 144, 162, 180, 200, 220, 242, 264, 288, 312, 338, 364, 392, 420, 450, 480, 512, 544, 578, 612, 648, 684, 722, 760, 800, 840, 882, 924, 968, 1012, 1058, 1104, 1152, 1200, 1250, 1300, 1352, 1404
Offset: 1

Views

Author

Aaron Khan, Jul 04 2022

Keywords

Comments

After the first 7 terms, the first differences are terms of A052928: for n >= 8, a(n) - a(n-1) = A052928(n-1).
The increase in differences going from an even n to an odd n, but not from an odd n to an even n, is due to the differing optimal layouts for odd vs. even n values. See example section for a(7) and a(8).

Examples

			Examples for n=2 to n=6 have been included as they do not follow the general formula.
.
A solution illustrating a(2)=2:
  +-----+
  | B B |
  | W W |
  +-----+
.
A solution illustrating a(3)=3:
  +-------+
  | . . . |
  | B B W |
  | W W B |
  +-------+
.
A solution illustrating a(4)=6:
  +---------+
  | B B . W |
  | W W . B |
  | B B . W |
  | W W . B |
  +---------+
.
A solution illustrating a(5)=10:
  +-----------+
  | W B W B W |
  | W B W B W |
  | . . . . . |
  | B W B W B |
  | B W B W B |
  +-----------+
.
A solution illustrating a(6)=14:
  +-------------+
  | B B W W B B |
  | W W B B W W |
  | B . . . . B |
  | W . . . . W |
  | B B W W B B |
  | W W B B W W |
  +-------------+
.
Examples for n=7 and n=8 are provided, as while both follow the same formula, the layout for even values of n differs from the layout for odd values of n (related to the fact that, for even values of n, the floor function rounds down a non-integer value).
.
A solution illustrating a(7)=18:
  +---------------+
  | B B B B B B B |
  | B B B B B B B |
  | B . B . B . B |
  | . . . . . . . |
  | W . W . W . W |
  | W W W W W W W |
  | W W W W W W W |
  +---------------+
.
A solution illustrating a(8)=24:
  +-----------------+
  | B B B B B B B B |
  | B B B B B B B B |
  | B B B B B B B B |
  | . . . . . . . . |
  | . . . . . . . . |
  | W W W W W W W W |
  | W W W W W W W W |
  | W W W W W W W W |
  +-----------------+
		

Crossrefs

Cf. A007590, A052928, A176222 (peaceable kings), A250000 (peaceable queens), A002620 (peaceable rooks).

Formula

For n > 6, a(n) = floor(((n-1)^2)/2).
G.f.: x^2*(2 - x + 2*x^3 - 2*x^4 - x^5 + 2*x^6 + 2*x^7 - 2*x^8)/((1 - x)^3*(1 + x)). - Stefano Spezia, Jul 05 2022

A101037 Triangle read by rows: T(n,1) = T(n,n) = n and for 1

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 2, 2, 4, 5, 3, 2, 3, 5, 6, 4, 2, 2, 4, 6, 7, 5, 3, 2, 3, 5, 7, 8, 6, 4, 2, 2, 4, 6, 8, 9, 7, 5, 3, 2, 3, 5, 7, 9, 10, 8, 6, 4, 2, 2, 4, 6, 8, 10, 11, 9, 7, 5, 3, 2, 3, 5, 7, 9, 11, 12, 10, 8, 6, 4, 2, 2, 4, 6, 8, 10, 12, 13, 11, 9, 7, 5, 3, 2, 3, 5, 7, 9, 11, 13, 14, 12, 10, 8, 6, 4, 2, 2, 4, 6, 8, 10, 12, 14
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 27 2004

Keywords

Comments

For n>1: sum of n-th row = A007590(n+1).

Examples

			Triangle begins:
  1;
  2, 2;
  3, 2, 3;
  4, 2, 2, 4;
  5, 3, 2, 3, 5;
  6, 4, 2, 2, 4, 6;
  7, 5, 3, 2, 3, 5, 7;
  ...
		

Programs

  • Maple
    T:= proc(n,k) if k < (n+1)/2 then n-2*k+2 elif k=(n+1)/2 then 2 else 2*k-n fi end proc:
    T(1,1):= 1:
    seq(seq(T(n,k),k=1..n),n=1..20); # Robert Israel, Jan 30 2018
  • Mathematica
    T[n_, 1] := n; T[n_, n_] := n; T[n_, k_] := T[n, k] = Which[k < (n + 1)/2, n - 2*k + 2, k == (n + 1)/2, 2, True, 2*k - n];
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 04 2019 *)

Formula

From Robert Israel, Jan 30 2018: (Start)
T(n,k) = n - 2*k + 2 if k < (n+1)/2.
T(n,(n+1)/2) = 2 if n>1 is odd.
T(n,k) = 2*k - n if k > (n+1)/2.
G.f. as triangle: x*y*(x^6*y^3-2*x^5*y^3-2*x^5*y^2+x^4*y^3+3*x^4*y^2+x^4*y-3*x^2*y+1)/((1-x^2*y)*(1-x)^2*(1-x*y)^2).
(End)

A131478 a(n) = ceiling(n^4/4).

Original entry on oeis.org

0, 1, 4, 21, 64, 157, 324, 601, 1024, 1641, 2500, 3661, 5184, 7141, 9604, 12657, 16384, 20881, 26244, 32581, 40000, 48621, 58564, 69961, 82944, 97657, 114244, 132861, 153664, 176821, 202500, 230881, 262144, 296481, 334084, 375157, 419904, 468541, 521284
Offset: 0

Views

Author

Mohammad K. Azarian, Jul 27 2007

Keywords

Crossrefs

Programs

  • Magma
    [Ceiling(n^4/4) : n in [0..50]]; // Vincenzo Librandi, Oct 01 2011
    
  • Mathematica
    Ceiling[Range[0,40]^4/4] (* Harvey P. Dale, May 17 2019 *)
    CoefficientList[Series[(x(x^3 + 6x^2 + 7x + 1)Cosh[x]+ (x^4 + 6x^3 + 7x^2 + x + 3)Sinh[x])/4,{x,0,35}],x]Table[n!,{n,0,35}] (* Stefano Spezia, Feb 19 2023 *)
  • PARI
    vector(50, n, n--;ceil(n^4/4)) \\ Michel Marcus, Jun 16 2015
    
  • Python
    def A131478(n): return n**4+3>>2 # Chai Wah Wu, Jan 30 2023

Formula

From R. J. Mathar, Dec 19 2008: (Start)
G.f.: x*(1 + 10*x^2 + x^4)/((1 - x)^5*(1 + x)).
a(n) + a(n+1) = A058919(n+1). (End)
a(n) = floor(n^4/4 + 3/4). - Bruno Berselli, Dec 21 2017
E.g.f.: (x*(x^3 + 6*x^2 + 7*x + 1)*cosh(x) + (x^4 + 6*x^3 + 7*x^2 + x + 3)*sinh(x))/4. - Stefano Spezia, Feb 18 2023

A143183 Triangle T(n,k) = 1 + (2+n)*abs(n-2*k), read by rows, for 0 <= k <= n.

Original entry on oeis.org

1, 4, 4, 9, 1, 9, 16, 6, 6, 16, 25, 13, 1, 13, 25, 36, 22, 8, 8, 22, 36, 49, 33, 17, 1, 17, 33, 49, 64, 46, 28, 10, 10, 28, 46, 64, 81, 61, 41, 21, 1, 21, 41, 61, 81, 100, 78, 56, 34, 12, 12, 34, 56, 78, 100, 121, 97, 73, 49, 25, 1, 25, 49, 73, 97, 121
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 17 2008

Keywords

Examples

			Triangle begins as:
    1;
    4,  4;
    9,  1,  9;
   16,  6,  6, 16;
   25, 13,  1, 13, 25;
   36, 22,  8,  8, 22, 36;
   49, 33, 17,  1, 17, 33, 49;
   64, 46, 28, 10, 10, 28, 46, 64;
   81, 61, 41, 21,  1, 21, 41, 61, 81;
  100, 78, 56, 34, 12, 12, 34, 56, 78, 100;
  121, 97, 73, 49, 25,  1, 25, 49, 73,  97, 121;
		

Crossrefs

Programs

  • Magma
    [1+(n+2)*Abs(n-2*k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 23 2024
    
  • Maple
    A143183 := proc(n,k)
            1+(2+n)*abs(n-2*m) ;
    end proc: # R. J. Mathar, Jul 12 2012
  • Mathematica
    T[n_, m_]:= 1 + Abs[(n-m+1)^2 - (m+1)^2];
    Table[T[n, m], {n,0,12}, {m,0,n}]//Flatten
  • SageMath
    flatten([[1+(n+2)*abs(n-2*k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Apr 23 2024

Formula

T(n, k) = 1 + (2+n)*abs(n-2*k), for 0 <= k <= n.
T(n, k) = T(n, n-k).
Sum_{k=0..n} T(n, k) = (n+2)*A007590(n+1) + n + 1 (row sums).
From G. C. Greubel, Apr 23 2024: (Start)
T(n, 0) = A000290(n+1).
T(2*n-1, n) = A005843(n+1), n >= 1.
Sum_{k=0..n} (-1)^k*T(n, k) = (1/2)*(1 + (-1)^n)*((n^2 + 3*n + 3) - (-1)^(n/2)*(n + 2)). (End)

Extensions

Row sums corrected by R. J. Mathar, Jul 12 2012

A157458 Triangle, read by rows, double tent function: T(n,k) = min(1 + 2*k, 1 + 2*(n-k), n).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 3, 4, 3, 1, 1, 3, 5, 5, 3, 1, 1, 3, 5, 6, 5, 3, 1, 1, 3, 5, 7, 7, 5, 3, 1, 1, 3, 5, 7, 8, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 10, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 12, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 13, 11, 9, 7, 5, 3, 1
Offset: 0

Views

Author

Roger L. Bagula, Mar 01 2009

Keywords

Comments

The general form of this, and related triangular sequences, takes the form A(n, k, m) = (m*(n-k) + 1)*A(n-1, k-1, m) + (m*k + 1)*A(n-1, k, m) + m*f(n, k)* A(n-2, k-1, m), where f(n,k) is a polynomial in n and k.
Row sums are: 0, 2, 4, 8, 12, 18, 24, 32, 40, 50, 60, ... = A007590(n+1). - N. J. A. Sloane, Aug 27 2009

Examples

			Triangle begins as:
  0;
  1, 1;
  1, 2, 1;
  1, 3, 3, 1;
  1, 3, 4, 3, 1;
  1, 3, 5, 5, 3, 1;
  1, 3, 5, 6, 5, 3, 1;
  1, 3, 5, 7, 7, 5, 3, 1;
  1, 3, 5, 7, 8, 7, 5, 3, 1;
  1, 3, 5, 7, 9, 9, 7, 5, 3, 1;
  1, 3, 5, 7, 9, 10, 9, 7, 5, 3, 1;
		

Crossrefs

Programs

  • Maple
    T := proc(m,n) return min(1+2*m, 1+2*(n-m), n): end: seq(seq(T(m,n),m=0..n),n=0..14); # Nathaniel Johnston, Apr 29 2011
  • Mathematica
    T[n_, k_]:= Min[1+2*k, 1+2*(n-k), n]; Table[T[n, k], {n,0,14}, {k,0,n}]//Flatten

Formula

T(n, k) = min(1 + 2*k, 1 + 2*(n - k), n).
From Yu-Sheng Chang, May 19 2020: (Start)
O.g.f.: F(z,v) = (1+v)*z/((1-v*z-1)*(1-z)*(1-v*z^2)).
T(n,k) = [v^k] (1+v)*(2*v^(n+1)+2-((sqrt(v)-1)^2 * (-1)^n + (sqrt(v)+1)^2) * v^((1/2)*n))/(2*(v-1)^2). (End)

Extensions

Edited by N. J. A. Sloane, Aug 27 2009
More terms from and partially edited by G. C. Greubel, May 21 2020

A184532 Array, read by rows: T(n,h)=floor[1/{(h+n^3)^(1/3)}], where h=1,2,...,3n^2+3n and {}=fractional part.

Original entry on oeis.org

3, 2, 1, 1, 1, 1, 12, 6, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 13, 9, 7, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 24, 16, 12, 9, 8, 7, 6, 5, 5, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 75, 37, 25, 18, 15, 12, 10, 9, 8, 7, 7, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Jan 16 2011

Keywords

Examples

			First 2 rows:
  3, 2, 1, 1, 1, 1
  12, 6, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
		

Crossrefs

Cf. A013942 (analogous array for sqrt(h+n^2)), A184533.
Columns 1 to 6: A033428 (3n^2), A184532=A000290+A007590, A000290 (n^2), A184534, A184535, A080476.

Programs

  • Mathematica
    f[n_,h_]:=FractionalPart[(n^3+h)^(1/3)];
    g[n_,h_]:=Floor[1/f[n,h]];
    Table[Flatten[Table[g[n,h],{n,1,5},{h,1,3n^2+3n}]]]
    TableForm[Table[g[n,h],{n,1,5},{h,1,3n^2+3n}]]

Formula

T(n,h)=floor[1/{(h+n^3)^(1/3)}], where h=1,2,...,3n^2+3n and {}=fractional part.

A190650 Product of iterated integral part of square root.

Original entry on oeis.org

1, 2, 3, 8, 10, 12, 14, 16, 27, 30, 33, 36, 39, 42, 45, 128, 136, 144, 152, 160, 168, 176, 184, 192, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 432, 444, 456, 468, 480, 492, 504, 516, 528, 540, 552, 564, 576, 686, 700, 714, 728, 742, 756, 770, 784, 798, 812, 826, 840, 854, 868, 882, 1024, 1040, 1056, 1072, 1088, 1104, 1120, 1136, 1152, 1168, 1184, 1200, 1216, 1232, 1248, 1264, 1280
Offset: 1

Views

Author

Keywords

Comments

a(n) = n * f(n) * f(f(n)) * ..., where f(n) = floor(sqrt(n)). Although this is written as an infinite product, all but finitely many terms are 1.

Examples

			a(1) = 1, a(2) = 2*1, a(3) = 3*1, a(4) = 4*2*1, a(5) = 5*2*1, ....
		

Crossrefs

Programs

  • PARI
    a(n)=local(r);r=n;while((n=sqrtint(n))>1,r*=n);r

Formula

a(1) = 1; for n>1, a(n) = n*a(floor(sqrt(n))).
a(n) <= n^2/2 for n > 1. Equality holds for n = 2^2^k.

A192396 Square array T(n, k) = floor(((k+1)^n - (1+(-1)^k)/2)/2) read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 4, 4, 2, 0, 0, 8, 13, 8, 2, 0, 0, 16, 40, 32, 12, 3, 0, 0, 32, 121, 128, 62, 18, 3, 0, 0, 64, 364, 512, 312, 108, 24, 4, 0, 0, 128, 1093, 2048, 1562, 648, 171, 32, 4, 0, 0, 256, 3280, 8192, 7812, 3888, 1200, 256, 40, 5, 0
Offset: 0

Views

Author

Adi Dani, Jun 29 2011

Keywords

Comments

T(n,k) is the number of compositions of odd natural numbers into n parts <=k.

Examples

			T(2,4)=12: there are 12 compositions of odd natural numbers into 2 parts <=4
  1: (0,1), (1,0);
  3: (1,2), (2,1), (0,3), (3,0);
  5: (1,4), (4,1), (2,3), (3,2);
  7: (3,4), (4,3).
The table starts
    0,  0,   0,   0,    0,    0, ... A000004;
    0,  1,   1,   2,    2,    3, ... A004526;
    0,  2,   4,   8,   12,   18, ... A007590;
    0,  4,  13,  32,   62,  108, ... A036487;
    0,  8,  40, 128,  312,  648, ... A191903;
    0, 16, 121, 512, 1562, 3888, ... A191902;
    .        .      .       .    ...
with columns: A000004, A000079, A003462, A004171, A128531, A081341, ... .
Antidiagonal triangle begins:
  0;
  0,  0;
  0,  1,   0;
  0,  2,   1,   0;
  0,  4,   4,   2,   0;
  0,  8,  13,   8,   2,   0;
  0, 16,  40,  32,  12,   3,  0;
  0, 32, 121, 128,  62,  18,  3,  0;
  0, 64, 364, 512, 312, 108, 24,  4,  0;
		

Crossrefs

Programs

  • Magma
    A192396:= func< n,k | Floor(((k+1)^n - (1+(-1)^k)/2)/2) >;
    [A192396(n-k,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 11 2023
    
  • Maple
    A192396 := proc(n,k) (k+1)^n-(1+(-1)^k)/2 ; floor(%/2) ; end proc:
    seq(seq( A192396(d-k,k),k=0..d),d=0..10) ; # R. J. Mathar, Jun 30 2011
  • Mathematica
    T[n_, k_]:= Floor[((k+1)^n - (1+(-1)^k)/2)/2];
    Table[T[n-k,k], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    def A192396(n,k): return ((k+1)^n - ((k+1)%2))//2
    flatten([[A192396(n-k,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 11 2023
Previous Showing 61-70 of 90 results. Next