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 21-30 of 42 results. Next

A154957 A symmetric (0,1)-triangle.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1
Offset: 0

Views

Author

Paul Barry, Jan 18 2009

Keywords

Comments

Parity of A003983. - Jeremy Gardiner, Mar 09 2014

Examples

			Triangle begins
  1;
  1, 1;
  1, 0, 1;
  1, 0, 0, 1;
  1, 0, 1, 0, 1;
  1, 0, 1, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1;
  1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1;
		

Crossrefs

Cf. A003983, A004524 (row sums), A154958 (diagonal sums), A158856.

Programs

  • Mathematica
    T[n_, k_]:= Sum[(Mod[j+1,2] - Mod[j,2]), {j,0,Min[k,n-k]}];
    Table[T[n, k], {n,0,20}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 07 2022 *)
  • Sage
    def A154957(n,k): return sum( (j+1)%2 - j%2 for j in (0..min(k,n-k)) )
    flatten([[A154957(n,k) for k in (0..n)] for n in (0..20)]) # G. C. Greubel, Mar 07 2022

Formula

T(n,k) = Sum_{j=0..n} [j<=k]*[j<=n-k]*(mod(j+1,2) - mod(j,2)).
T(2*n, n) - T(2*n, n+1) = (-1)^n.
T(2*n, n) = (n+1) mod 2.
Sum_{k=0..n} T(n, k) = A004524(n+3).
Sum_{k=0..floor(n/2)} T(n-k, k) = A154958(n) (diagonal sums).
From G. C. Greubel, Mar 07 2022: (Start)
T(n, n-k) = T(n, k).
Sum_{k=0..floor(n/2)} T(n, k) = floor((n+4)/4).
T(2*n+1, n) = (1+(-1)^n)/2. (End)

A133823 Triangle whose rows are sequences of increasing and decreasing cubes:1; 1,8,1; 1,8,27,8,1; ... .

Original entry on oeis.org

1, 1, 8, 1, 1, 8, 27, 8, 1, 1, 8, 27, 64, 27, 8, 1, 1, 8, 27, 64, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 343, 216, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 343, 512, 343, 216, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 343, 512, 729
Offset: 0

Views

Author

Peter Bala, Sep 25 2007

Keywords

Comments

Reading the triangle by rows produces the sequence 1,1,8,1,1,8,27,8,1,..., analogous to A004737.
T(n,k) = min(n,k)^3. The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). - Boris Putievskiy, Jan 13 2013

Examples

			Triangle starts
  1;
  1, 8, 1;
  1, 8, 27, 8, 1;
  1, 8, 27, 64, 27, 8, 1;
From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as table:
  1...1...1...1...1...1...
  1...8...8...8...8...8...
  1...8..27..27..27..27...
  1...8..27..64..64..64...
  1...8..27..64.125.125...
  1...8..27..64.125.216...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  1,8,1;
  1,8,27,8,1;
  1,8,27,64,27,8,1;
  1,8,27,64,125,64,27,8,1;
  1,8,27,64,125,216,125,64,27,8,1;
  . . .
Row number k contains 2*k-1 numbers 1,8,...,(k-1)^3,k^3,(k-1)^3,...,8,1. (End)
		

Crossrefs

Programs

  • Mathematica
    Table[Join[Range[n]^3,Range[n-1,1,-1]^3],{n,10}]//Flatten (* Harvey P. Dale, May 29 2019 *)

Formula

O.g.f.: (1+qx)(1+4qx+q^2x^2)/((1-x)(1-qx)^3(1-q^2x)) = 1 + x(1 + 8q + q^2) + x^2(1 + 8q + 27q^2 + 8q^3 + q^4) + ... .
From Boris Putievskiy, Jan 13 2013: (Start)
a(n) = (A004737(n))^3.
a(n) = (floor(sqrt(n-1)) - |n- floor(sqrt(n-1))^2- floor(sqrt(n-1))-1| +1)^3. (End)

A133824 Triangle whose rows are sequences of increasing and decreasing fourth powers: 1; 1,16,1; 1,16,81,16,1; ... .

Original entry on oeis.org

1, 1, 16, 1, 1, 16, 81, 16, 1, 1, 16, 81, 256, 81, 16, 1, 1, 16, 81, 256, 625, 256, 81, 16, 1, 1, 16, 81, 256, 625, 1296, 625, 256, 81, 16, 1, 1, 16, 81, 256, 625, 1296, 2401, 1296, 625, 256, 81, 16, 1, 1, 16, 81, 256, 625, 1296, 2401, 4096, 2401, 1296, 625, 256, 81, 16
Offset: 0

Views

Author

Peter Bala, Sep 25 2007

Keywords

Comments

Reading the triangle by rows produces the sequence 1,1,16,1,1,16,81,16,1,..., analogous to A004737.
From - Boris Putievskiy, Jan 13 2013: (Start)
The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1).
Row number k contains 2*k-1 numbers 1,16,...,(k-1)^4,k^4,(k-1)^4,...,16,1. (End)

Examples

			Triangle starts:
  1;
  1, 16, 1;
  1, 16, 81, 16, 1;
  1, 16, 81, 256, 81, 16, 1;
  ...
From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as table:
  1...1...1...1...1.. .1...
  1..16..16..16..16...16...
  1..16..81..81..81...81...
  1..16..81.256.256..256...
  1..16..81.256.625..625...
  1..16..81.256.625.1296...
  ...
(End)
		

Crossrefs

Programs

  • Mathematica
    p4[n_]:=Module[{c=Range[n]^4},Join[c,Rest[Reverse[c]]]]; Flatten[p4/@ Range[10]] (* Harvey P. Dale, Dec 08 2014 *)

Formula

O.g.f.: (1+qx)(1+11qx+11q^2x^2+q^3x^3)/((1-x)(1-qx)^4(1-q^2x)) = 1 + x(1 + 16q + q^2) + x^2(1 + 16q + 81q^2 + 16q^3 + q^4) + ... . Cf. 4th row of A008292.
From Boris Putievskiy, Jan 13 2013: (Start)
T(n,k) = min(n,k)^4.
a(n) = (A004737(n))^4.
a(n) = (A124258(n))^2.
a(n) = (floor(sqrt(n-1)) - |n- floor(sqrt(n-1))^2- floor(sqrt(n-1))-1| +1)^4. (End)

A138139 Triangle read by rows: row n contains n terms and each column lists the prime numbers A000040.

Original entry on oeis.org

2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 3, 5, 3, 2, 2, 3, 5, 5, 3, 2, 2, 3, 5, 7, 5, 3, 2, 2, 3, 5, 7, 7, 5, 3, 2, 2, 3, 5, 7, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 13, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11, 13, 13, 11, 7, 5, 3, 2, 2, 3, 5, 7, 11
Offset: 1

Views

Author

Omar E. Pol, Mar 09 2008, Mar 25 2008

Keywords

Examples

			Triangle begins:
      2
     2,2
    2,3,2
   2,3,3,2
  2,3,5,3,2
		

Crossrefs

Programs

A353452 a(n) is the determinant of the n X n symmetric matrix M(n) that is defined as M[i,j] = abs(i - j) if min(i, j) < max(i, j) <= 2*min(i, j), and otherwise 0.

Original entry on oeis.org

1, 0, -1, 0, 1, -4, 12, 64, -172, -1348, 3456, 34240, -87084, 370640, -872336, -22639616, 52307088, -181323568, 399580288, 23627011200, -51305628400, -686160247552, 1545932859328, 68098264912128, -155370174372864, 6326621032802304, -13829529077133312, -1087288396552040448
Offset: 0

Views

Author

Stefano Spezia, Apr 19 2022

Keywords

Examples

			a(8) = -172:
    0,  1,  0,  0,  0,  0,  0,  0;
    1,  0,  1,  2,  0,  0,  0,  0;
    0,  1,  0,  1,  2,  3,  0,  0;
    0,  2,  1,  0,  1,  2,  3,  4;
    0,  0,  2,  1,  0,  1,  2,  3;
    0,  0,  3,  2,  1,  0,  1,  2;
    0,  0,  0,  3,  2,  1,  0,  1;
    0,  0,  0,  4,  3,  2,  1,  0.
		

Crossrefs

Cf. A000982 (number of zero matrix elements), A003983, A006918, A007590 (number of positive matrix elements), A049581, A051125, A173997, A350050, A352967, A353453 (permanent).

Programs

  • Mathematica
    Join[{1},Table[Det[Table[If[Min[i,j]
    				
  • PARI
    a(n) = matdet(matrix(n, n, i, j, if ((min(i,j) < max(i,j)) && (max(i,j) <= 2*min(i,j)), abs(i-j)))); \\ Michel Marcus, Apr 20 2022
    
  • Python
    from sympy import Matrix
    def A353452(n): return Matrix(n, n, lambda i, j: abs(i-j) if min(i,j)Chai Wah Wu, Aug 29 2023

Formula

Sum_{i=1..n+1-k} M[i,i+k] = A173997(n, k) with 1 <= k <= floor((n + 1)/2).
Sum_{i=1..n} Sum_{j=1..n} M[i,j] = 2*A006918(n-1).
Sum_{i=1..n} Sum_{j=1..n} M[i,j]^2 = A350050(n+1).

A353453 a(n) is the permanent of the n X n symmetric matrix M(n) that is defined as M[i,j] = abs(i - j) if min(i, j) < max(i, j) <= 2*min(i, j), and otherwise 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 4, 64, 576, 7844, 63524, 882772, 11713408, 252996564, 5879980400, 184839020672, 5698866739200, 229815005974352, 9350598794677712, 480306381374466176, 23741710999960266176, 1446802666239931811472, 86153125248221968292928, 6197781268948296566634304
Offset: 0

Views

Author

Stefano Spezia, Apr 19 2022

Keywords

Examples

			a(8) = 7844:
    0,  1,  0,  0,  0,  0,  0,  0;
    1,  0,  1,  2,  0,  0,  0,  0;
    0,  1,  0,  1,  2,  3,  0,  0;
    0,  2,  1,  0,  1,  2,  3,  4;
    0,  0,  2,  1,  0,  1,  2,  3;
    0,  0,  3,  2,  1,  0,  1,  2;
    0,  0,  0,  3,  2,  1,  0,  1;
    0,  0,  0,  4,  3,  2,  1,  0.
		

Crossrefs

Cf. A000982 (number of zero matrix elements), A003983, A006918, A007590 (number of positive matrix elements), A049581, A051125, A173997, A350050, A352967, A353452 (determinant).

Programs

  • Mathematica
    Join[{1},Table[Permanent[Table[If[Min[i,j]
    				
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if ((min(i,j) < max(i,j)) && (max(i,j) <= 2*min(i,j)), abs(i-j)))); \\ Michel Marcus, Apr 20 2022
    
  • Python
    from sympy import Matrix
    def A353453(n): return Matrix(n, n, lambda i, j: abs(i-j) if min(i,j)Chai Wah Wu, Aug 29 2023

Formula

Sum_{i=1..n+1-k} M[i,i+k] = A173997(n, k) with 1 <= k <= floor((n + 1)/2).
Sum_{i=1..n} Sum_{j=1..n} M[i,j] = 2*A006918(n-1).
Sum_{i=1..n} Sum_{j=1..n} M[i,j]^2 = A350050(n+1).

A115216 "Correlation triangle" for 2^n.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 8, 10, 10, 8, 16, 20, 21, 20, 16, 32, 40, 42, 42, 40, 32, 64, 80, 84, 85, 84, 80, 64, 128, 160, 168, 170, 170, 168, 160, 128, 256, 320, 336, 340, 341, 340, 336, 320, 256, 512, 640, 672, 680, 682, 682, 680, 672, 640, 512, 1024, 1280, 1344, 1360, 1364
Offset: 0

Views

Author

Paul Barry, Jan 16 2006

Keywords

Comments

Row sums are A102301. T(2n,n) gives A002450(n+1). Diagonal sums are A115217.
Construction: Take antidiagonal triangle of MM^T where M is the sequence array for the sequence 2^n.
When formated as a square array, this is the self-fusion matrix (as in Example and Mathematica sections) of the sequence (2^n); for interlacing zeros of associated characteristic polynomials, see A202868. [Clark Kimberling, Dec 26 2011]

Examples

			Triangle begins
  1,
  2, 2,
  4, 5, 4,
  8, 10, 10, 8,
  16, 20, 21, 20, 16,
  32, 40, 42, 42, 40, 32,
  ...
Northwest corner of square matrix:
  1....2....4....8....16
  2....5....10...20...40
  4....10...21...42...85
  8....20...41...85...170
  16...40...84...170..341
  ..
		

Crossrefs

Programs

  • Mathematica
    (* A115216 as a square matrix *)
    s[k_] := 2^(k - 1);
    U = NestList[Most[Prepend[#, 0]] &, #, Length[#] - 1] &[Table[s[k], {k, 1, 12}]];
    L = Transpose[U]; M = L.U; TableForm[M]
    m[i_, j_] := M[[i]][[j]];
    Flatten[Table[m[i, n + 1 - i], {n, 1, 12}, {i, 1, n}]]
    f[n_] := Sum[m[i, n], {i, 1, n}] + Sum[m[n, j], {j, 1, n - 1}]
    Table[f[n], {n, 1, 12}]
    Table[Sqrt[f[n]], {n, 1, 12}]  (* -1+2^n *)
    Table[m[n, n], {n, 1, 12}]  (* A002450 *)
    (* Clark Kimberling, Dec 26 2011 *)

Formula

T(n, k) = Sum_{j=0..n} [j<=k]*2^(k-j)[j<=n-k]*2^(n-k-j).
G.f.: 1/((1-2*x)*(1-2*x*y)*(1-x^2*y)). - Christian G. Bower, Jan 17 2006

A261684 Array T(n,k) = lunar product n*k (n >= 0, k >= 0) read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 10, 2, 3, 4, 5, 5, 4, 3, 2, 10, 0, 0, 11, 10, 3, 4, 5, 6, 5, 4, 3, 10, 11, 0
Offset: 0

Views

Author

N. J. A. Sloane, Sep 06 2015

Keywords

Comments

See A087061 for definition. Note that 0+x = x and 9*x = x for all x.

Examples

			Lunar multiplication table begins:
0 0 0 0 0 0 ...
0 1 1 1 1 1 ...
0 1 2 2 2 2 ...
0 1 2 3 3 3 ...
0 1 2 3 4 4 ...
0 1 2 3 4 5 ...
....
		

Crossrefs

Cf. A087061 (addition).
See A087062 for a version that excludes the zero row and column.
Similar to but different from A003983.

Programs

  • Maple
    # convert decimal to string:
    rec := proc(n) local t0,t1,e,l; if n <= 0 then RETURN([[0],1]); fi; t0 := n mod 10; t1 := (n-t0)/10; e := [t0]; l := 1; while t1 <> 0 do t0 := t1 mod 10; t1 := (t1-t0)/10; l := l+1; e := [op(e),t0]; od; RETURN([e,l]); end;
    # convert string to decimal:
    cer := proc(ep) local i,e,l,t1; e := ep[1]; l := ep[2]; t1 := 0; if l <= 0 then RETURN(t1); fi; for i from 1 to l do t1 := t1+10^(i-1)*e[i]; od; RETURN(t1); end;
    # lunar addition:
    dadd := proc(m,n) local i,r1,r2,e1,e2,l1,l2,l,l3,t0; r1 := rec(m); r2 := rec(n); e1 := r1[1]; e2 := r2[1]; l1 := r1[2]; l2 := r2[2]; l := max(l1,l2); l3 := min(l1,l2); t0 := array(1..l); for i from 1 to l3 do t0[i] := max(e1[i],e2[i]); od; if l>l3 then for i from l3+1 to l do if l1>l2 then t0[i] := e1[i]; else t0[i] := e2[i]; fi; od; fi; cer([t0,l]); end;
    # lunar multiplication:
    dmul := proc(m,n) local k,i,j,r1,r2,e1,e2,l1,l2,l,t0; r1 := rec(m); r2 := rec(n); e1 := r1[1]; e2 := r2[1]; l1 := r1[2]; l2 := r2[2]; l := l1+l2-1; t0 := array(1..l); for i from 1 to l do t0[i] := 0; od; for i from 1 to l2 do for j from 1 to l1 do k := min(e2[i],e1[j]); t0[i+j-1] := max(t0[i+j-1],k); od; od; cer([t0,l]); end;
    # to produce the b-file:
    M:=199; c:=0; for n from 0 to M do for k from 0 to n do lprint(c,dmul(n-k,k)); c:=c+1; od: od:

A352967 Array read by antidiagonals: A(i, j) = abs(i - j) if min(i, j) < max(i, j) <= 2*min(i, j), and otherwise 0, with i >= 0 and j >= 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 3, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0, 2, 4, 0, 0, 0, 0
Offset: 0

Views

Author

Stefano Spezia, Apr 21 2022

Keywords

Examples

			The array begins:
    0, 0, 0, 0, 0, 0, 0, 0, ...
    0, 0, 1, 0, 0, 0, 0, 0, ...
    0, 1, 0, 1, 2, 0, 0, 0, ...
    0, 0, 1, 0, 1, 2, 3, 0, ...
    0, 0, 2, 1, 0, 1, 2, 3, ...
    0, 0, 0, 2, 1, 0, 1, 2, ...
    0, 0, 0, 3, 2, 1, 0, 1, ...
    0, 0, 0, 0, 3, 2, 1, 0, ...
    ...
		

Crossrefs

Cf. A003983, A049581, A051125, A307018 (antidiagonal half-sums), A353452, A353453.

Programs

  • Mathematica
    A[i_,j_]:=If[Min[i, j]
    				

A362679 a(n) is the permanent of the n X n symmetric matrix M(n) defined by M[i, j, n] = min(i, j)*(n + 1) - i*j.

Original entry on oeis.org

1, 1, 5, 72, 2309, 140400, 14495641, 2347782144, 562385930985, 190398813728000, 87889475202276461, 53726132414026874880, 42454821207656237294381, 42495322215073539046387712, 52954624815227996007075890625, 80932107560443542398970529579008, 149736953621087625813286348913927569
Offset: 0

Views

Author

Stefano Spezia, Apr 29 2023

Keywords

Comments

M(n-1)/n is the inverse of the Cartan matrix for SU(n): the special unitary group of degree n.
The elements sum of the matrix M(n) is A002415(n+1).
The antidiagonal sum of the matrix M(n) is A005993(n-1).
The n-th row of A107985 gives the row or column sums of the matrix M(n+1).

Examples

			a(3) = 72:
           [3, 2, 1]
    M(3) = [2, 4, 2]
           [1, 2, 3]
a(5) = 140400:
           [5, 4, 3, 2, 1]
           [4, 8, 6, 4, 2]
    M(5) = [3, 6, 9, 6, 3]
           [2, 4, 6, 8, 4]
           [1, 2, 3, 4, 5]
		

References

  • E. B. Dynkin, Semisimple subalgebras of semisimple Lie algebras, Am. Math. Soc. Translations, Series 2, Vol. 6, 1957.

Crossrefs

Cf. A000272, A000292 (trace), A002415, A003983, A003991, A005993, A106314 (antidiagonals), A107985.

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](
        Matrix(n, (i, j)-> min(i, j)*(n+1)-i*j))):
    seq(a(n), n=0..16);  # Alois P. Heinz, Apr 30 2023
  • Mathematica
    M[i_, j_, n_]:=Min[i, j](n+1)-i j; Join[{1}, Table[Permanent[Table[M[i, j, n], {i, n}, {j, n}]], {n, 17}]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, min(i, j)*(n + 1) - i*j)); \\ Michel Marcus, Apr 30 2023

Formula

Conjecture: det(M(n)) = A000272(n+1).
The conjecture is true (see proof in Links). - Stefano Spezia, May 24 2023
Previous Showing 21-30 of 42 results. Next