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 10 results.

A204235 Permanent of the n-th principal submatrix of A143182.

Original entry on oeis.org

1, 5, 42, 632, 14124, 449652, 19200336, 1063272704, 74068997888, 6344884818304, 655635015988864, 80447681129070080, 11565193558509497088, 1925787312858332101888, 367762470538537620457472, 79847718328265949957881856, 19560087897336150724249288704
Offset: 1

Views

Author

Clark Kimberling, Jan 13 2012

Keywords

Comments

The n-th principal submatrix of A143182 is an n X n symmetric Toeplitz matrix whose first row consists of successive natural numbers 1, ..., n. - Stefano Spezia, Sep 23 2018
Conjecture: a(1) and a(2) are the only terms that are odd numbers. - Stefano Spezia, Oct 28 2018

Crossrefs

Cf. A143182.

Programs

  • Maple
    f:= proc(n) uses LinearAlgebra;
    Permanent(ToeplitzMatrix([seq(i, i=1 ..n)], n, symmetric))
    end proc:
    map(f, [$1..20]); # Stefano Spezia, Oct 28 2018
  • Mathematica
    f[i_, j_] := Max[i - j + 1, j - i + 1];  (* A143182 *)
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[4]] (* 4 X 4 principal submatrix *)
    Table[Det[m[n]], {n, 1, 22}]  (* A001792 - signed *)
    Permanent[m_] :=
      With[{a = Array[x, Length[m]]},
       Coefficient[Times @@ (m.a), Times @@ a]];
    Table[Permanent[m[n]], {n, 1, 14}]  (* A204235 *)
    b[i_]:=i; a[n_]:=Permanent[ToeplitzMatrix[Array[b, n], Array[b, n]]]; Array[a, 22] (* Stefano Spezia, Sep 23 2018 *)
  • PARI
    {a(n) = matpermanent(matrix(n, n, i, j, max(i - j + 1, j - i + 1)))}
    for(n=1, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Apr 29 2019

Extensions

Extended by Stefano Spezia, Oct 28 2018

A203992 Array: row n shows the coefficients of the characteristic polynomial of the n-th principal submatrix of (A143182 in square format).

Original entry on oeis.org

1, -1, -3, -2, 1, 8, 14, 3, -1, -20, -56, -40, -4, 1, 48, 184, 224, 90, 5, -1, -112, -544, -936, -672, -175, -6, 1, 256, 1504, 3344, 3480, 1680, 308, 7, -1, -576, -3968, -10816, -14784, -10560, -3696, -504, -8, 1, 1280, 10112, 32640, 55328
Offset: 1

Views

Author

Clark Kimberling, Jan 09 2012

Keywords

Comments

Let p(n)=p(n,x) be the characteristic polynomial of the n-th principal submatrix. The zeros of p(n) are real, and they interlace the zeros of p(n+1). See A202605 for a guide to related sequences.

Examples

			Top of the array:
 1... -1
-3... -1.... 1
 8.... 14... 3... -1
-20.. -56.. -40.. -4... 1
		

References

  • (For references regarding interlacing roots, see A202605.)

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := Max[i - j + 1, j - i + 1];
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[6]]  (* 6x6 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
    {n, 1, 12}, {i, 1, n}]]  (* A143182 in square format *)
    p[n_] := CharacteristicPolynomial[m[n], x];
    c[n_] := CoefficientList[p[n], x]
    TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
    Table[c[n], {n, 1, 12}]
    Flatten[%]    (* A203992 *)
    TableForm[Table[c[n], {n, 1, 10}]]

A204016 Symmetric matrix based on f(i,j) = max(j mod i, i mod j), by antidiagonals.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 10 2012

Keywords

Comments

A204016 represents the matrix M given by f(i,j) = max{(j mod i), (i mod j)} for i >= 1 and j >= 1. See A204017 for characteristic polynomials of principal submatrices of M, with interlacing zeros.
Guide to symmetric matrices M based on functions f(i,j) and characteristic polynomial sequences (c.p.s.) with interlaced zeros:
f(i,j)..........................M.........c.p.s.
C(i+j,j)........................A007318...A045912
min(i,j)........................A003983...A202672
max(i,j)........................A051125...A203989
(i+j)*min(i,j)..................A203990...A203991
|i-j|...........................A049581...A203993
max(i-j+1,j-i+1)................A143182...A203992
min(i-j+1,j-i+1)................A203994...A203995
min(i(j+1),j(i+1))..............A203996...A203997
max(i(j+1)-1,j(i+1)-1)..........A203998...A203999
min(i(j+1)-1,j(i+1)-1)..........A204000...A204001
min(2i+j,i+2j)..................A204002...A204003
max(2i+j-2,i+2j-2)..............A204004...A204005
min(2i+j-2,i+2j-2)..............A204006...A204007
max(3i+j-3,i+3j-3)..............A204008...A204011
min(3i+j-3,i+3j-3)..............A204012...A204013
min(3i-2,3j-2)..................A204028...A204029
1+min(j mod i, i mod j).........A204014...A204015
max(j mod i, i mod j)...........A204016...A204017
1+max(j mod i, i mod j).........A204018...A204019
min(i^2,j^2)....................A106314...A204020
min(2i-1, 2j-1).................A157454...A204021
max(2i-1, 2j-1).................A204022...A204023
min(i(i+1)/2,j(j+1)/2)..........A106255...A204024
gcd(i,j)........................A003989...A204025
gcd(i+1,j+1)....................A204030...A204111
min(F(i+1),F(j+1)),F=A000045....A204026...A204027
gcd(F(i+1),F(j+1)),F=A000045....A204112...A204113
gcd(L(i),L(j)),L=A000032........A204114...A204115
gcd(2^i-1,2^j-2)................A204116...A204117
gcd(prime(i),prime(j))..........A204118...A204119
gcd(prime(i+1),prime(j+1))......A204120...A204121
gcd(2^(i-1),2^(j-1))............A144464...A204122
max(floor(i/j),floor(j/i))......A204123...A204124
min(ceiling(i/j),ceiling(j/i))..A204143...A204144
Delannoy matrix.................A008288...A204135
max(2i-j,2j-i)..................A204154...A204155
-1+max(3i-j,3j-i)...............A204156...A204157
max(3i-2j,3j-2i)................A204158...A204159
floor((i+1)/2)..................A204164...A204165
ceiling((i+1)/2)................A204166...A204167
i+j.............................A003057...A204168
i+j-1...........................A002024...A204169
i*j.............................A003991...A204170
..abbreviation below: AOE means "all 1's except"
AOE f(i,i)=i....................A204125...A204126
AOE f(i,i)=A000045(i+1).........A204127...A204128
AOE f(i,i)=A000032(i)...........A204129...A204130
AOE f(i,i)=2i-1.................A204131...A204132
AOE f(i,i)=2^(i-1)..............A204133...A204134
AOE f(i,i)=3i-2.................A204160...A204161
AOE f(i,i)=floor((i+1)/2).......A204162...A204163
...
Other pairs (M, c.p.s.): (A204171, A204172) to (A204183, A204184)
See A202695 for a guide to choices of symmetric matrix M for which the zeros of the characteristic polynomials are all positive.

Examples

			Northwest corner:
  0 1 1 1 1 1 1 1
  0 1 2 2 2 2 2 2
  1 2 0 3 3 3 3 3
  1 2 3 0 4 4 4 4
  1 2 3 4 0 5 5 5
  1 2 3 4 5 0 6 6
  1 2 3 4 5 6 0 7
		

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := Max[Mod[i, j], Mod[j, i]];
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8x8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
    {n, 1, 12}, {i, 1, n}]]  (* A204016 *)
    p[n_] := CharacteristicPolynomial[m[n], x];
    c[n_] := CoefficientList[p[n], x]
    TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
    Table[c[n], {n, 1, 12}]
    Flatten[%]               (* A204017 *)
    TableForm[Table[c[n], {n, 1, 10}]]

A074148 a(n) = n + floor(n^2/2).

Original entry on oeis.org

1, 4, 7, 12, 17, 24, 31, 40, 49, 60, 71, 84, 97, 112, 127, 144, 161, 180, 199, 220, 241, 264, 287, 312, 337, 364, 391, 420, 449, 480, 511, 544, 577, 612, 647, 684, 721, 760, 799, 840, 881, 924, 967, 1012, 1057, 1104, 1151, 1200, 1249, 1300, 1351, 1404, 1457
Offset: 1

Views

Author

Amarnath Murthy, Aug 28 2002

Keywords

Comments

Last term in each group in A074147.
Index of the last occurrence of n in A100795.
Equals row sums of an infinite lower triangular matrix with alternate columns of (1, 3, 5, 7, ...) and (1, 1, 1, ...). - Gary W. Adamson, May 16 2010
a(n) = A214075(n+2,2). - Reinhard Zumkeller, Jul 03 2012
The heart pattern appears in (n+1) X (n+1) coins. Abnormal orientation heart is A065423. Normal heart is A093005 (A074148 - A065423). Void is A007590. See illustration in links. - Kival Ngaokrajang, Sep 11 2013
a(n+1) is the smallest size of an n-prolific permutation; a permutation of s letters is n-prolific if each (s - n)-subset of the letters in its one-line notation forms a unique pattern. - David Bevan, Nov 30 2016
For n > 2, a(n-1) is the smallest size of a nontrivial permuted packing of diamond tiles with diagonal length n; a permuted packing is a translational packing for which the set of translations is the plot of a permutation. - David Bevan, Nov 30 2016
Also the length of a longest path in the (n+1) X (n+1) bishop and black bishop graphs. - Eric W. Weisstein, Mar 27 2018
Row sums of A143182 triangle - Nikita Sadkov, Oct 10 2018

Examples

			Equals row sums of the generating triangle:
   1;
   3,  1;
   5,  1,  1;
   7,  1,  3,  1;
   9,  1,  5,  1,  1;
  11,  1,  7,  1,  3,  1;
  13,  1,  9,  1,  5,  1,  1;
  15,  1, 11,  1,  7,  1,  3,  1;
  ...
Example: a(5) = 17 = (9 + 1 + 5 + 1 + 1). - _Gary W. Adamson_, May 16 2010
The smallest 1-prolific permutations are 3142 and its symmetries; a(2) = 4. The smallest 2-prolific permutations are 3614725 and its symmetries; a(3) = 7. - _David Bevan_, Nov 30 2016
		

Crossrefs

a(n) = A000982(n+1) - 1.
Antidiagonal sums of A237447 & A237448.

Programs

Formula

a(n) = (2*n^2 + 4*n + (-1)^n - 1)/4. - Vladeta Jovovic, Apr 06 2003
a(n) = A109225(n,2) for n > 1. - Reinhard Zumkeller, Jun 23 2005
a(n) = +2*a(n-1) - 2*a(n-3) + 1*a(n-4). - Joerg Arndt, Apr 02 2011
a(n) = a(n-2) + 2*n, a(0) = 0, a(1) = 1. - Paul Barry, Jul 17 2004
From R. J. Mathar, Aug 30 2008: (Start)
G.f.: x*(1 + 2*x - x^2)/((1 - x)^3*(1 + x)).
a(n) + a(n+1) = A028387(n).
a(n+1) - a(n) = A109613(n+1). (End)
a(n) = floor(n^4/(2n^2 + 1)) with offset 2..a(2) = 1. - Gary Detlefs, Feb 11 2010
a(n) = n + floor(n^2/2). - Wesley Ivan Hurt, Jun 14 2013
From Franck Maminirina Ramaharo, Jan 04 2019: (Start)
a(n) = n*(n + 1)/2 + floor(n/2) = A000217(n) + A004526(n).
E.g.f.: (exp(-x) - (1 - 6*x - 2*x^2)*exp(x))/4. (End)
Sum_{n>=1} 1/a(n) = 1 - cot(Pi/sqrt(2))*Pi/(2*sqrt(2)). - Amiram Eldar, Sep 16 2022

Extensions

More terms from Vladeta Jovovic, Apr 06 2003
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007
Further edited by N. J. A. Sloane, Sep 06 2008 at the suggestion of R. J. Mathar
Description simplified by Eric W. Weisstein, Mar 27 2018

A220073 Mirror of the triangle A130517.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 03 2012

Keywords

Comments

T(n,k) = A130517(n,n-k+1), 1 <= k <= n;
T(n,n) = T(n,1) + 1.
From Boris Putievskiy, Jan 15 2013: (Start)
General case see A187760. Let m be natural number. Table T(n,k) n, k > 0, T(n,k)=n-k+1, if n>=k, T(n,k)=k-n+m-1, if n < k. Table T(n,k) read by antidiagonals. The first column of the table T(n,1) is the sequence of the natural numbers A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m} shifts the sequence A000027. For m=1 the result is A220073, for m=2 the result is A143182. (End)
First inverse function (numbers of rows) for pairing function A209293. - Boris Putievskiy, Jan 28 2013

Examples

			From _Boris Putievskiy_, Jan 15 2013: (Start)
The start of the sequence as table:
1..1..2..3..4..5..6..7...
2..1..1..2..3..4..5..6...
3..2..1..1..2..3..4..5...
4..3..2..1..1..2..3..4...
5..4..3..2..1..1..2..3...
6..5..4..3..2..1..1..2...
7..6..5..4..3..2..1..1...
8..7..6..5..4..3..2..1...
. . .
The start of the sequence as triangle array read by rows:
1,
1, 2,
2, 1, 3,
3, 1, 2, 4,
4, 2, 1, 3, 5,
5, 3, 1, 2, 4, 6,
6, 4, 2, 1, 3, 5, 7,
7, 5, 3, 1, 2, 4, 6, 8,
. . .
Row number r contains r numbers: r-1, r-3,...,1,...r-2,r.
(End)
		

Crossrefs

Cf. A028310 (left edge), A000027 (right edge), A000012 (central terms), A000217 (row sums), A220075 (partial sums in rows), A002260, A000027, A143182, A187760, A209293.

Programs

  • Haskell
    a220073 n k = a220073_tabl !! (n-1) !! (k-1)
    a220073_row n = a220073_tabl !! (n-1)
    a220073_tabl = map reverse a130517_tabl
  • Mathematica
    max = 13;
    row[n_] := Join[Range[n, 1, -1], Range[max - n + 1]];
    T = Array[row, max];
    Table[T[[n - k + 1, k]], {n, 1, max}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Sep 11 2017 *)

Formula

T(1,1)=1, for n>1: T(n,k)=T(n-1,n-k+1), 1<=k
From Boris Putievskiy, Jan 15 2013: (Start)
For the general case
a(n) = |(t+1)^2 - 2n| + m*floor((t^2+3t+2-2n)/(t+1)),
where t = floor((-1+sqrt(8*n-7))/2).
For m = 2
a(n) = |(t+1)^2 - 2n| + floor((t^2+3t+2-2n)/(t+1)),
where t=floor((-1+sqrt(8*n-7))/2). (End)

A187760 Table T(n,k) read by antidiagonals. T(n,k)=n-k+1, if n>=k, T(n,k)=k-n+2, if n < k.

Original entry on oeis.org

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

Author

Boris Putievskiy, Jan 04 2013

Keywords

Comments

In general, let m be natural number. T(n,k)=n-k+1, if n>=k, T(n,k)=k-n+m-1, if n A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m} shifts the sequence A000027. For m=1 the result is A220073, for m=2 the result is A143182. This sequence is the result for m=3.

Examples

			The start of the sequence as table for the general case:
1....m..m+1..m+2..m+3..m+4..m+5...
2....1....m..m+1..m+2..m+3..m+4...
3....2....1....m..m+1..m+2..m+3...
4....3....2....1....m..m+1..m+2...
5....4....3....2....1....m..m+1...
6....5....4....3....2....1....m...
7....6....5....4....3....2....1...
. . .
The start of the sequence as triangle array read by rows for the general case:
1;
m,2;
m+1,1,3;
m+2,m,2,4;
m+3,m+1,1,3,5;
m+4,m+2,m,2,4,6;
m+5,m+3,m+1,1,3,5,7;
. . .
Row number r contains r numbers: m+r-2, m+r-4,...r-2,r.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := If[1 <= k <= n, n - k + 1, k - n + 2];
    Table[T[n - k + 1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 06 2018 *)
  • Python
    t=int((math.sqrt(8*n-7)-1)/2)
    result=abs((t+1)**2 - 2*n) + 3*int((t**2+3*t+2-2*n)/(t+1))

Formula

For the general case, a(n) = |(t+1)^2 - 2n| + m*floor((t^2+3t+2-2n)/(t+1)), where t=floor((-1+sqrt(8*n-7))/2).
For m=3, a(n) = |(t+1)^2 - 2n| + 3*floor((t^2+3t+2-2n)/(t+1)), where t=floor((-1+sqrt(8*n-7))/2).

A359559 a(n) is the determinant of an n X n Hermitian Toeplitz matrix whose first row consists of 1, 2*i, ..., n*i, where i denotes the imaginary unit.

Original entry on oeis.org

1, 1, -3, -16, -36, -40, 20, 184, 400, 432, -112, -1472, -3136, -3328, 576, 9856, 20736, 21760, -2816, -59392, -123904, -129024, 13312, 333824, 692224, 716800, -61440, -1785856, -3686400, -3801088, 278528, 9207808, 18939904, 19464192, -1245184, -46137344, -94633984
Offset: 0

Author

Stefano Spezia, Jan 06 2023

Keywords

Examples

			a(3) = -16:
  [   1,  2*i, 3*i;
   -2*i,    1, 2*i;
   -3*i, -2*i,   1 ]
		

Crossrefs

Cf. A001792 (symmetric Toeplitz matrix), A143182.
Cf. A359560 (permanent), A359561, A359562.
Cf. A359614 (minimal), A359615 (maximal).

Programs

  • Mathematica
    Join[{1},Table[Det[ToeplitzMatrix[Join[{1},I Range[2,n]]]],{n,36}]]
  • PARI
    a(n) = matdet(matrix(n, n, i, j, if (i==j, 1, if (iMichel Marcus, Jan 20 2023
    
  • Python
    from sympy import Matrix, I
    def A359559(n): return Matrix(n,n,[i-j+(1 if i>j else -1) if i!=j else I for i in range(n) for j in range(n)]).det()*(1,-I,-1,I)[n&3] # Chai Wah Wu, Jan 25 2023

Formula

A359614(n) <= a(n) <= A359615(n).
Conjectured formulas: (Start)
O.g.f.: (1 - 5*x + 9*x^2 - 12*x^3 + 10*x^4 - 4*x^5)/(1 - 2*x + 2*x^2)^3.
a(n) = 6*a(n-1) - 18*a(n-2) + 32*a(n-3) - 36*a(n-4) + 24*a(n-5) - 8*a(n-6) for n > 5.
E.g.f.: (2 + exp(x)*((1 + x)*(2 + x)*cos(x) - (1 + x + x^2)*sin(x)))/4. (End)

A359560 a(n) is the permanent of an n X n Hermitian Toeplitz matrix whose first row consists of 1, 2*i, ..., n*i, where i denotes the imaginary unit.

Original entry on oeis.org

1, 1, 5, 18, 360, 2800, 151424, 1926704, 218991568, 3961998320, 815094714320, 19339258670304, 6524060415099520, 192715406460607360, 99364368150722162944, 3525158026102570745600, 2635328330670632415828224, 109381927750670379873854720, 113797518402277434839782802688
Offset: 0

Author

Stefano Spezia, Jan 06 2023

Keywords

Examples

			a(3) = 18:
  [   1,  2*i, 3*i;
   -2*i,    1, 2*i;
   -3*i, -2*i,   1 ]
		

Crossrefs

Cf. A143182, A204235 (symmetric Toeplitz matrix).
Cf. A359559 (determinant), A359561, A359562.
Cf. A359614 (minimal), A359615 (maximal).

Programs

  • Maple
    A359560 := proc(n)
        local T,c,r ;
        if n =0 then
            return 1 ;
        end if;
        T := Matrix(n,n,shape=hermitian) ;
        T[1,1] := 1 ;
        for c from 2 to n do
            T[1,c] := c*I ;
        end do:
        for r from 2 to n do
            for c from r to n do
                T[r,c] := T[r-1,c-1] ;
            end do:
        end do:
        LinearAlgebra[Permanent](T) ;
        simplify(%) ;
    end proc:
    seq(A359560(n),n=0..15) ; # R. J. Mathar, Jan 31 2023
  • Mathematica
    Join[{1},Table[Permanent[ToeplitzMatrix[Join[{1},I Range[2,n]]]],{n,18}]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 1, if (iMichel Marcus, Jan 20 2023
    
  • Python
    from sympy import Matrix, I
    def A359560(n): return Matrix(n,n,[i-j+(1 if i>j else -1) if i!=j else I for i in range(n) for j in range(n)]).per()*(1,-I,-1,I)[n&3] if n else 1 # Chai Wah Wu, Jan 25 2023

Formula

A359614(n) <= a(n) <= A359615(n).

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

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

A369515 Triangle of hexagons read by row, with right diagonal having in-order odd-indexed primes, left diagonal having 2 followed by the in-order even-indexed primes, and column elements are the least multiple of the prime at the top of the column not already in the sequence, with 0 and 1 prepended.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 4, 11, 13, 6, 10, 17, 19, 14, 8, 22, 23, 29, 26, 9, 15, 34, 31, 37, 38, 21, 12, 33, 46, 41, 43, 58, 39, 18, 20, 51, 62, 47, 53, 74, 57, 28, 16, 44, 69, 82, 59, 61, 86, 87, 52, 24, 25, 68, 93, 94, 67, 71, 106, 111, 76, 35, 30, 55, 92, 123, 118
Offset: 0

Author

J. Stauduhar, Jan 25 2024

Keywords

Comments

The sequence is a permutation of the nonnegative integers.

Examples

			a(0)=0, a(1)=1, followed by triangle read by rows:
                   |2|
               |3| | | |5 |
          |7 | | | |4| |  | |11|
     |13| |  | |6| | | |10| |  | |17|
|19| |  | |14| | | |8| |  | |22| |  | |23|
Row 5, element 3 = 8, because 2*3=6 has already appeared, but 2*4=8 has not.
		

Crossrefs

Cf. A143182.

Programs

  • Python
    from sympy.ntheory.generate import prime
    from math import ceil
    def get_column_tops(n):
        return [1 + abs((n-1)-2*m) for m in range(1,n-1)]
    def get_indices(rowNum):
      left=(rowNum*(rowNum-1))//2
      right=left+rowNum-1
      return (left, right)
    def get_least(m,seq):
      mult=2
      d=m*mult
      while d in seq:
        mult+=1
        d=m*mult
      return d
    seq,rnum = ([],1)
    while len(seq)<56:
      seq.append(prime(rnum+max(0,rnum-2)))
      cols = get_column_tops(rnum)
      for k in range(len(cols)):
          ndcs=get_indices(cols[k])
          if k 1:
        seq.append(prime(2*rnum-1))
      rnum+=1
    seq=[0,1]+seq
    print(seq)
Showing 1-10 of 10 results.