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 11-20 of 23 results. Next

A344839 Square array T(n, k), n, k >= 0, read by antidiagonals; T(n, k) = abs(n * 2^max(0, w(k)-w(n)) - k * 2^max(0, w(n)-w(k))) (where w = A070939).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, May 29 2021

Keywords

Comments

In other words, we right pad the binary expansion of the lesser of n and k with zeros (provided it is positive) so that both numbers have the same number of binary digits, and then take the absolute difference.

Examples

			Array T(n, k) begins:
  n\k|   0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
  ---+-------------------------------------------------------
    0|   0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
    1|   1  0  0  1  0  1  2  3  0  1   2   3   4   5   6   7
    2|   2  0  0  1  0  1  2  3  0  1   2   3   4   5   6   7
    3|   3  1  1  0  2  1  0  1  4  3   2   1   0   1   2   3
    4|   4  0  0  2  0  1  2  3  0  1   2   3   4   5   6   7
    5|   5  1  1  1  1  0  1  2  2  1   0   1   2   3   4   5
    6|   6  2  2  0  2  1  0  1  4  3   2   1   0   1   2   3
    7|   7  3  3  1  3  2  1  0  6  5   4   3   2   1   0   1
    8|   8  0  0  4  0  2  4  6  0  1   2   3   4   5   6   7
    9|   9  1  1  3  1  1  3  5  1  0   1   2   3   4   5   6
   10|  10  2  2  2  2  0  2  4  2  1   0   1   2   3   4   5
   11|  11  3  3  1  3  1  1  3  3  2   1   0   1   2   3   4
   12|  12  4  4  0  4  2  0  2  4  3   2   1   0   1   2   3
   13|  13  5  5  1  5  3  1  1  5  4   3   2   1   0   1   2
   14|  14  6  6  2  6  4  2  0  6  5   4   3   2   1   0   1
   15|  15  7  7  3  7  5  3  1  7  6   5   4   3   2   1   0
		

Crossrefs

Cf. A344834 (AND), A344835 (OR), A344836 (XOR), A344837 (min), A344838 (max).

Programs

  • PARI
    T(n,k,op=(x,y)->abs(x-y),w=m->#binary(m)) = { op(n*2^max(0, w(k)-w(n)), k*2^max(0, w(n)-w(k))) }

Formula

T(n, k) = T(k, n).
T(n, n) = 0.
T(n, 0) = n.
T(n, 1) = A053645(n) for any n > 0.

A330240 Square array T(n,k): concatenate the absolute differences of the digits of n and k (the smaller one padded with leading zeros), read by antidiagonals, n, k >= 0.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Dec 06 2019

Keywords

Comments

A digit-wise analog of A049581. Referred to as "box" operation by Eric Angelini.
The binary operator T: N x N -> N is commutative, so this table is symmetric: it does not matter in which direction the antidiagonals are read, and it would be sufficient to specify only the lower half of the square table: see A330238 for this triangle. Zero is the neutral element: T(x,0) = x for all x. Any x is its own inverse or opposite x', as shown by the zero diagonal T(x,x) = 0.
A measure of non-associativity is the "commutator" ((x T y) T x') T y' = ((x T y) T x) T y which would be zero in the associative case, given that x = x' for all x. Here it turns out to be given by 2*A053616, read as a triangle, and rows extended quasi-periodically with period 10, see example.

Examples

			The square array starts as follows:
   n |k=0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 ...
  ---+-------------------------------------------------------------
   0 |  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 ...
   1 |  1  0  1  2  3  4  5  6  7  8 11 10 11 12 13 14 15 16 17 ...
   2 |  2  1  0  1  2  3  4  5  6  7 12 11 10 11 12 13 14 15 16 ...
   3 |  3  2  1  0  1  2  3  4  5  6 13 12 11 10 11 12 13 14 15 ...
   4 |  4  3  2  1  0  1  2  3  4  5 14 13 12 11 10 11 12 13 14 ...
   5 |  5  4  3  2  1  0  1  2  3  4 15 14 13 12 11 10 11 12 13 ...
   6 |  6  5  4  3  2  1  0  1  2  3 16 15 14 13 12 11 10 11 12 ...
   7 |  7  6  5  4  3  2  1  0  1  2 17 16 15 14 13 12 11 10 11 ...
   8 |  8  7  6  5  4  3  2  1  0  1 18 17 16 15 14 13 12 11 10 ...
   9 |  9  8  7  6  5  4  3  2  1  0 19 18 17 16 15 14 13 12 11 ...
  10 | 10 11 12 13 14 15 16 17 18 19  0  1  2  3  4  5  6  7  8 ...
  11 | 11 10 11 12 13 14 15 16 17 18  1  0  1  2  3  4  5  6  7 ...
  12 | 12 11 10 11 12 13 14 15 16 17  2  1  0  1  2  3  4  5  6 ...
   (...)
It differs from A049581 only if at least one index is > 9.
The table of commutators Comm(n,k) := T(T(T(n,k),n),k) reads as follows:
   n |k=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22...
  ---+---------------------------------------------------------------
   0 |  0 0 0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0  0  0  0  0  0...
   1 |  0 0 2 2 2 2 2 2 2 2  0  0  2  2  2  2  2  2  2  2  0  0  2...
   2 |  0 0 0 2 4 4 4 4 4 4  0  0  0  2  4  4  4  4  4  4  0  0  0...
   3 |  0 0 0 0 2 4 6 6 6 6  0  0  0  0  2  4  6  6  6  6  0  0  0...
   4 |  0 0 0 0 0 2 4 6 8 8  0  0  0  0  0  2  4  6  8  8  0  0  0...
   5 |  0 0 0 0 0 0 2 4 6 8  0  0  0  0  0  0  2  4  6  8  0  0  0...
   6 |  0 0 0 0 0 0 0 2 4 6  0  0  0  0  0  0  0  2  4  6  0  0  0...
   7 |  0 0 0 0 0 0 0 0 2 4  0  0  0  0  0  0  0  0  2  4  0  0  0...
   8 |  0 0 0 0 0 0 0 0 0 2  0  0  0  0  0  0  0  0  0  2  0  0  0...
   9 |  0 0 0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0  0  0  0  0  0...
  10 |  0 0 0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0  0  0 20 20 20...
  11 |  0 0 2 2 2 2 2 2 2 2  0  0  2  2  2  2  2  2  2  2 20 20 22...
  12 |  0 0 0 2 4 4 4 4 4 4  0  0  0  2  4  4  4  4  4  4 20 20 20...
   (...)
Up to row & column 10, the columns are twice the sequence A053616 written as triangle. The first 10 X 10 block repeats horizontally and vertically. Further away from the origin, the elements of this block multiplied by corresponding powers of 10 are added to the corresponding 10 X 10 blocks: e.g., the block Comm(130..139,270..279) = Comm(0..9,0..9) + 260, where 260 = 100*Comm(1,2) + 10*Comm(3,7).
		

Crossrefs

Cf. A330238 (variant excluding row & column 0), A330237 (lower left triangle), A049581 (T(n,k) = |n-k|).

Programs

  • PARI
    A330240(a,b)=fromdigits(abs(Vec(digits(min(a,b)),if(a+b,-logint(a=max(a,b),10)-1))-digits(a)))

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).

A330237 Square array T(n,k): concatenate the absolute differences of the digits of n and k (the smaller one padded with leading zeros); read by antidiagonals; n, k >= 1.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Dec 06 2019

Keywords

Comments

A digit-wise analog of A049581.
The binary operator T: N x N -> N is commutative, therefore this table is symmetric and it does not matter in which direction the antidiagonals are read. It would also be sufficient to specify only the lower half of the square table: see A330238 for this variant. The operator is also defined for either argument equal to 0, which is the neutral element: T(x,0) = 0 for all x. Therefore we omit row & column 0 here, see A330240 for the table including these. Every element is its opposite or inverse, as shown by the zero diagonal T(x,x) = 0.

Examples

			The square array starts as follows:
   n | k=1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 ...
  ---+-----------------------------------------------------------
   1 |   0  1  2  3  4  5  6  7  8 11 10 11 12 13 14 15 16 17 ...
   2 |   1  0  1  2  3  4  5  6  7 12 11 10 11 12 13 14 15 16 ...
   3 |   2  1  0  1  2  3  4  5  6 13 12 11 10 11 12 13 14 15 ...
   4 |   3  2  1  0  1  2  3  4  5 14 13 12 11 10 11 12 13 14 ...
   5 |   4  3  2  1  0  1  2  3  4 15 14 13 12 11 10 11 12 13 ...
   6 |   5  4  3  2  1  0  1  2  3 16 15 14 13 12 11 10 11 12 ...
   7 |   6  5  4  3  2  1  0  1  2 17 16 15 14 13 12 11 10 11 ...
   8 |   7  6  5  4  3  2  1  0  1 18 17 16 15 14 13 12 11 10 ...
   9 |   8  7  6  5  4  3  2  1  0 19 18 17 16 15 14 13 12 11 ...
  10 |  11 12 13 14 15 16 17 18 19  0  1  2  3  4  5  6  7  8 ...
  11 |  10 11 12 13 14 15 16 17 18  1  0  1  2  3  4  5  6  7 ...
  12 |  11 10 11 12 13 14 15 16 17  2  1  0  1  2  3  4  5  6 ...
   (...)
It differs from A049581 only if at least one index is > 10.
		

Crossrefs

Cf A330240 (variant including row & column 0), A330237 (lower left triangle), A049581 (T(n,k) = |n-k|).

Programs

  • PARI
    T(a,b)=fromdigits(abs(Vec(digits(min(a,b)),-logint(a=max(a,b),10)-1)-digits(a)))

A330238 Triangle T(n,k): concatenate the absolute differences of the digits of n and k (the smaller one padded with leading zeros); n >= k >= 1.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 0, 11, 10, 11, 12, 13, 14, 15, 16, 17, 2, 1, 0, 12, 11, 10, 11, 12, 13, 14, 15, 16, 3, 2, 1, 0, 13, 12, 11, 10, 11, 12, 13, 14, 15, 4, 3, 2, 1, 0
Offset: 1

Views

Author

M. F. Hasler, Dec 06 2019

Keywords

Comments

A digit-wise analog of A049581.
The binary operator T: N x N -> N is commutative, so we need only the lower half of the symmetric square table A330238 or A330240 (including n, k = 0). Also, 0 is the neutral element: T(x,0) = x for all x, therefore we omit row & column 0. The trivial diagonal T(x,x) = 0 could also be omitted but serves as an end-of-row marker and makes indexing simpler and more natural.

Examples

			The triangle starts as follows:
    n | k=1  2   3   4   5   6   7   8   9  10  11
   ---+-------------------------------------------
    1 |  0,
    2 |  1,  0,
    3 |  2,  1,  0,
    4 |  3,  2,  1,  0,
    5 |  4,  3,  2,  1,  0,
    6 |  5,  4,  3,  2,  1,  0,
    7 |  6,  5,  4,  3,  2,  1,  0,
    8 |  7,  6,  5,  4,  3,  2,  1,  0,
    9 |  8,  7,  6,  5,  4,  3,  2,  1,  0,
   10 | 11, 12, 13, 14, 15, 16, 17, 18, 19,  0,
   11 | 10, 11, 12, 13, 14, 15, 16, 17, 18,  1,  0,
   12 | 11, 10, 11, 12, 13, 14, 15, 16, 17,  2,  1,  0,
    (...)
		

Crossrefs

Cf. A330237 (same as a square array read by antidiagonals), A330240 (idem, including row & column 0), A049581 (T(n,k) = |n-k|).

Programs

  • PARI
    A330238(n,k)=fromdigits(digits(n)-abs(Vec(digits(k),-logint(n,10)-1))) \\ see A330240 for a more general function not limited to 1 <= k <= n

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]
    				

A265129 Triangle read by rows, formed as the sum of the two versions of the natural numbers filling an equilateral triangle.

Original entry on oeis.org

2, 5, 5, 10, 10, 10, 17, 17, 17, 17, 26, 26, 26, 26, 26, 37, 37, 37, 37, 37, 37, 50, 50, 50, 50, 50, 50, 50, 65, 65, 65, 65, 65, 65, 65, 65, 82, 82, 82, 82, 82, 82, 82, 82, 82, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101
Offset: 1

Views

Author

Craig Knecht, Dec 02 2015

Keywords

Comments

The natural numbers can sequentially fill a right- or left-handed equilateral triangle. Componentwise addition of the values of these two triangles produces the present triangle.
The row sums for this triangle give A034262.
The difference between the right- and left-handed triangles produces A049581.

Examples

			Displayed as a triangle:
   2;
   5  5;
  10 10 10;
  17 17 17 17;
  26 26 26 26 26;
  37 37 37 37 37 37;
  ...
		

Crossrefs

Column k=1 gives A002522.
Cf. A049581 (difference of triangles), A034262 (row sum of triangle), A069894 (center column).
Cf. A071237.

Programs

  • Maple
    seq(seq(n^2+1,k=1..n),n=1..10); # Georg Fischer, Oct 01 2021

Formula

T(n,k) = n^2 + 1 for k = 1..n and n >= 1. - Georg Fischer, Oct 01 2021
Sum_{k=1..n} k * T(n,k) = A071237(n). - Alois P. Heinz, Oct 01 2021

Extensions

Row 6 with T(6,k)=37 inserted by Georg Fischer, Oct 01 2021

A351154 a(n) is the permanent of the n X n matrix M(n) that is defined as M[i,j,n] = A351153(n, min(i, j)) + abs(i - j).

Original entry on oeis.org

1, 1, 7, 169, 10388, 1324344, 305668180, 116145817656, 67770421715800, 57594670663866124, 68393751368082128320, 109765035421144948709232, 231657098706747226470685920, 628412716450312334529486247152, 2149132484027947970192241804640128, 9113755489596517688997731211571700256
Offset: 0

Views

Author

Stefano Spezia, Feb 02 2022

Keywords

Comments

Conjectures: (Start)
det(M(0)) = det(M(1)) = 1 and det(M(n)) = -(n - 2)! for n > 1.
abs(det(M(n))) = abs(A159333(n-2)). (End)

Examples

			a(3) = 169:
    1    2    3
    2    4    5
    3    5    6
a(4) = 10388:
    1    2    3    4
    2    5    6    7
    3    6    8    9
    4    7    9   10
		

Crossrefs

Programs

  • Mathematica
    A351153[n_,k_]:=n(k-1)-k(k-3)/2; M[i_,j_,n_]:=A351153[n,Min[i,j]]+Abs[i-j]; a[n_]:=Permanent[Table[M[i,j,n],{i,n},{j,n}]]; Join[{1},Array[a,15]]
  • PARI
    t(n, k) = n*(k-1) - k*(k-3)/2; \\ A351153
    a(n) = matpermanent(matrix(n, n, i, j, t(n, min(i, j)) + abs(i - j))); \\ Michel Marcus, Feb 03 2022

A068344 Square array read by antidiagonals of T(n,k) = sign(n-k).

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 06 2002

Keywords

Examples

			The start of the array is:
   0;
  -1,   1;
  -1,   0,   1;
  -1,  -1,   1,   1;
  -1,  -1,   0,   1,   1;
  ...
- _Boris Putievskiy_, Dec 24 2012
		

Crossrefs

Cf. A049581, A057427, A057428, A002260, A004736. As a straight sequence, a(n)=0 when n is in A046092. A023532 seen as a triangle is half this square.

Formula

a(n-1) = sign(A002260(n) - A004736(n)) or a(n-1) = sign((n-t*(t+1)/2) - ((t*t+3*t+4)/2-n)) where t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 24 2012
Previous Showing 11-20 of 23 results. Next