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-5 of 5 results.

A073254 Array read by antidiagonals, A(n,k) = n^2 + n*k + k^2.

Original entry on oeis.org

0, 1, 1, 4, 3, 4, 9, 7, 7, 9, 16, 13, 12, 13, 16, 25, 21, 19, 19, 21, 25, 36, 31, 28, 27, 28, 31, 36, 49, 43, 39, 37, 37, 39, 43, 49, 64, 57, 52, 49, 48, 49, 52, 57, 64, 81, 73, 67, 63, 61, 61, 63, 67, 73, 81, 100, 91, 84, 79, 76, 75, 76, 79, 84, 91, 100, 121, 111, 103, 97
Offset: 0

Views

Author

Michael Somos, Jul 23 2002

Keywords

Comments

Norm of elements in planar hexagonal lattice A_2.
Only numbers which appear in A003136 (Loeschian numbers) can appear in this array. - Peter Luschny, Nov 10 2021

Examples

			Triangle T(n, k) starts:
[0]               0
[1]              1, 1
[2]            4, 3, 4
[3]           9, 7, 7, 9
[4]       16, 13, 12, 13, 16
[5]     25, 21, 19, 19, 21, 25
[6]   36, 31, 28, 27, 28, 31, 36
[7] 49, 43, 39, 37, 37, 39, 43, 49
		

Crossrefs

A033994 gives antidiagonal sums.
Cf. A198063 (m=3), A198064 (m=4), A198065 (m=5).

Programs

  • Maple
    # Using the triangle formula:
    A073254 := (n,k) -> k^2 - k*n + n^2: # Peter Luschny, Oct 26 2011
  • Mathematica
    (* Using the array formula: *)
    A[n_, k_] := n^2 + n k + k^2;
    Table[A[n - k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 22 2018 *)
  • PARI
    {A(n, k) = n^2 + n*k + k^2}

Formula

From Peter Luschny, Oct 26 2011: (Start)
Let m = 2, for the cases m = 3, 4, and 5 see the cross-references.
T(n,k) = k^2 - k*n + n^2 = A(n-k,k).
T(n,k) = Sum_{j=0..m} Sum_{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j) for m = 2.
T(n,0) = T(n,n) = n^m = n^2 = A000290(n).
T(2n,n) = (m+1)*n^m = 3*n^2 = A033428(n).
T(2n+1,n+1) = (n+1)^(m+1) - n^(m+1) = (n+1)^3 - n^3 = A003215(n).
Sum_{k=0..n} T(n,k) = (5*n^3 + 6*n^2 + n)/6 = A033994(n).
T(n+1, k+1)*binomial(n, k)^3/(k+1)^2 = A194595(n,k). (End)

Extensions

Edited by Peter Luschny, Nov 10 2021

A198063 Triangle read by rows (n >= 0, 0 <= k <= n, m = 3); T(n,k) = Sum{j=0..m} Sum{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j).

Original entry on oeis.org

0, 1, 1, 8, 4, 8, 27, 15, 15, 27, 64, 40, 32, 40, 64, 125, 85, 65, 65, 85, 125, 216, 156, 120, 108, 120, 156, 216, 343, 259, 203, 175, 175, 203, 259, 343, 512, 400, 320, 272, 256, 272, 320, 400, 512, 729, 585, 477, 405, 369, 369, 405, 477, 585, 729
Offset: 0

Views

Author

Peter Luschny, Oct 26 2011

Keywords

Comments

Read as an infinite symmetric square array, this is the table A(n,k)=(n+k)(n^2+k^2), cf. A321500 for the triangle with k <= n. - M. F. Hasler, Nov 22 2018

Examples

			[0]                   0
[1]                  1, 1
[2]                8, 4, 8
[3]             27, 15, 15, 27
[4]           64, 40, 32, 40, 64
[5]        125, 85, 65, 65, 85, 125
[6]   216, 156, 120, 108, 120, 156, 216
[7] 343, 259, 203, 175, 175, 203, 259, 343
From _M. F. Hasler_, Nov 22 2018: (Start)
Can also be seen as the square array A(n,k)=(n+k)*(n^2 + k^2) read by antidiagonals:
n | k: 0   1   2   3 ...
--+----------------------
0 |    0   1   8  27 ...
1 |    1   4  15  40 ...
2 |    8  15  32  65 ...
3 |   27  40  65 108 ...
...      ...     ...
(End)
		

Crossrefs

Programs

  • Magma
    [[2*k^2*n-2*k*n^2+n^3: k in [0..n]]: n in [0..12]]; // G. C. Greubel, Nov 23 2018
    
  • Maple
    A198063 := (n,k) -> 2*k^2*n-2*k*n^2+n^3:
  • Mathematica
    t[n_, k_] := 2 k^2*n - 2 k*n^2 + n^3; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    A198063(n,k)=2*k^2*n-2*k*n^2+n^3 \\ See also A321500. - M. F. Hasler, Nov 22 2018
    
  • Sage
    [[ 2*k^2*n-2*k*n^2+n^3 for k in range(n+1)] for n in range(12)] # G. C. Greubel, Nov 23 2018

Formula

T(n,k) = 2*k^2*n - 2*k*n^2 + n^3.
T(n,0) = T(n,n) = n^m = n^3 = A000578(n).
T(2*n,n) = (m+1)n^m = 4*n^3 = A033430(n).
T(2*n+1,n+1) = (n+1)^(m+1) - n^(m+1) = (n+1)^4 - n^4 = A005917(n).
Sum{k=0..n} T(n,k) = (2*n^4 + 3*n^3 + n^2)/3 = A098077(n).
T(n+1,k+1)*C(n,k)^4/(k+1)^3 = A197653(n,k).

A197655 Triangle by rows T(n,k), showing the number of meanders with length (n+1)*6 and containing (k+1)*6 Ls and (n-k)*6 Rs, where Ls and Rs denote arcs of equal length and a central angle of 60 degrees which are positively or negatively oriented.

Original entry on oeis.org

1, 6, 1, 63, 126, 1, 364, 4374, 1092, 1, 1365, 85120, 127680, 5460, 1, 3906, 984375, 6000000, 1968750, 19530, 1, 9331, 7562646, 157828125, 210437500, 18906615, 55986, 1, 19608, 42824236, 2628749256, 11029593750, 4381248760, 128472708, 137256, 1
Offset: 0

Views

Author

Susanne Wienand, Oct 19 2011

Keywords

Comments

Definition of a meander:
A binary curve C is a triple (m, S, dir) such that
(a) S is a list with values in {L,R} which starts with an L,
(b) dir is a list of m different values, each value of S being allocated a value of dir,
(c) consecutive Ls increment the index of dir,
(d) consecutive Rs decrement the index of dir,
(e) the integer m>0 divides the length of S and
(f) C is a meander if each value of dir occurs length(S)/m times.
For this sequence, m = 6.
The values in the triangle are proved by brute force for 0 <= n <= 5. The formulas are not yet proved in general.
The number triangle can be calculated recursively by the number triangles and A007318, A103371, A194595, A197653 and A197654. For n > 0, the first column seems to be A053700. The diagonal right hand is A000012. Row sums are in A198258.
The conjectured formulas are confirmed by dynamic programming for 0 <= n <= 19. - Susanne Wienand, Jul 04 2015

Examples

			For n = 4 and k = 2, T(n,k) = 127680
Example for recursive formula:
T(1,4,2) = 6
T(5,4,4-1-2) = T(5,4,1) = 13504
T(6,4,2) = 6^6 + 6*13504 = 127680
Example for closed formula:
T(4,2) = A + B + C + D + E + F
A = 6^6       =  46656
B = 6^5 * 4   =  31104
C = 6^4 * 4^2 =  20736
D = 6^3 * 4^3 =  13824
E = 6^2 * 4^4 =   9216
F = 6   * 4^5 =   6144
T(4,2)        = 127680
Some examples of list S and allocated values of dir if n = 4 and k = 2:
Length(S) = (4+1)*6 = 30 and S contains (2+1)*6 = 18 Ls.
  S: L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,R,R,R,R,R,R,R,R,R,R,R,R
dir: 1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,0,5,4,3,2,1,0,5,4,3,2,1
  S: L,L,L,L,L,L,L,L,L,L,R,L,L,R,L,R,R,R,L,R,R,L,R,R,R,L,L,R,R,L
dir: 1,2,3,4,5,0,1,2,3,4,4,4,5,5,5,5,4,3,3,3,2,2,2,1,0,0,1,1,0,0
  S: L,L,L,L,R,L,L,R,L,L,R,L,R,R,L,L,L,L,L,R,R,L,L,L,R,R,R,R,L,R
dir: 1,2,3,4,4,4,5,5,5,0,0,0,0,5,5,0,1,2,3,3,2,2,3,4,4,3,2,1,1,1
Each value of dir occurs 30/6 = 5 times.
		

Crossrefs

Programs

  • Maple
    A197655 := (n,k) -> (1+n)*(1+3*k+3*k^2-n-3*k*n+n^2)*(1+k+k^2+n-k*n+n^2)* binomial(n,k)^6/(1+k)^5; seq(print(seq(A197655(n, k), k=0..n)), n=0..7); # Peter Luschny, Oct 21 2011
  • Mathematica
    T[n_, k_] := (1 + n)(1 + 3k + 3k^2 - n - 3k*n + n^2)(1 + k + k^2 + n - k*n + n^2) Binomial[n, k]^6/(1 + k)^5;
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 30 2018, after Peter Luschny *)
  • PARI
    A197655(n,k) = {if(n==1+2*k,6,(1+k)*(1-((n-k)/(1+k))^6)/(1+2*k-n))*binomial(n,k)^6} \\ Peter Luschny, Nov 24 2011
  • Sage
    def S(N,n,k) : return binomial(n,k)^(N+1)*sum(sum((-1)^(N-j+i)*binomial(N-i,j)*((n+1)/(k+1))^j for i in (0..N) for j in (0..N)))
    def A197655(n,k) : return S(5,n,k)
    for n in (0..5) : print([A197655(n,k) for k in (0..n)])  # Peter Luschny, Oct 24 2011
    

Formula

recursive formula (conjectured):
T(n,k) = T(6,n,k)
T(6,n,k) = T(1,n,k)^6 + T(1,n,k)*T(5,n,n-1-k), 0 <= k < n
T(6,n,n) = 1 k = n
T(5,n,k) = T(1,n,k)^5 + T(1,n,k)*T(4,n,n-1-k), 0 <= k < n
T(5,n,n) = 1 k = n
T(4,n,k) = T(1,n,k)^4 + T(1,n,k)*T(3,n,n-1-k), 0 <= k < n
T(4,n,n) = 1 k = n
T(3,n,k) = T(1,n,k)^3 + T(1,n,k)*T(2,n,n-1-k), 0 <= k < n
T(3,n,n) = 1 k = n
T(2,n,k) = T(1,n,k)^2 + T(1,n,k)*T(1,n,n-1-k), 0 <= k < n
T(2,n,n) = 1 k = n
T(5,n,k) = A197654
T(4,n,k) = A197653
T(3,n,k) = A194595
T(2,n,k) = A103371
T(1,n,k) = A007318 (Pascal's Triangle)
closed formula (conjectured): T(n,n) = 1, k = n
T(n,k) = A + B + C + D + E + F, k < n
A = (C(n,k))^6
B = (C(n,k))^5 * C(n,n-1-k)
C = (C(n,k))^4 *(C(n,n-1-k))^2
D = (C(n,k))^3 *(C(n,n-1-k))^3
E = (C(n,k))^2 *(C(n,n-1-k))^4
F = C(n,k) *(C(n,n-1-k))^5
[Susanne Wienand]
Let S(n,k) = binomial(2*n,n)^(k+1)*((n+1)^(k+1)-n^(k+1))/(n+1)^k. Then T(2*n,n) = S(n,5). (Cf. A103371, A194595, A197653). [Peter Luschny, Oct 21 2011]
T(n,k) = A198065(n+1,k+1)C(n,k)^6/(k+1)^5. [Peter Luschny, Oct 29 2011]
T(n,k) = h(n,k)*binomial(n,k)^6, where h(n,k) = (1+k)*(1-((n-k)/(1+k))^6)/(1+2*k-n) if 1+2*k-n <> 0 else h(n,k) = 6. [Peter Luschny, Nov 24 2011]

A198064 Triangle read by rows (n >= 0, 0 <= k <= n, m = 4); T(n,k) = Sum{j=0..m} Sum{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j).

Original entry on oeis.org

0, 1, 1, 16, 5, 16, 81, 31, 31, 81, 256, 121, 80, 121, 256, 625, 341, 211, 211, 341, 625, 1296, 781, 496, 405, 496, 781, 1296, 2401, 1555, 1031, 781, 781, 1031, 1555, 2401, 4096, 2801, 1936, 1441, 1280, 1441, 1936, 2801, 4096, 6561, 4681, 3355, 2511, 2101
Offset: 0

Views

Author

Peter Luschny, Oct 26 2011

Keywords

Examples

			[0]                      0
[1]                     1, 1
[2]                  16, 5, 16
[3]                81, 31, 31, 81
[4]            256, 121, 80, 121, 256
[5]         625, 341, 211, 211, 341, 625
[6]     1296, 781, 496, 405, 496, 781, 1296
[7] 2401, 1555, 1031, 781, 781, 1031, 1555, 2401
		

Crossrefs

Programs

  • Maple
    A198064 := (n,k) -> k^4-2*k^3*n+4*k^2*n^2-3*k*n^3+n^4:

Formula

T(n,k) = k^4-2*k^3*n+4*k^2*n^2-3*k*n^3+n^4.
T(n,0) = T(n,n) = n^m = n^4 = A000583(n).
T(2n,n) = (m+1)n^m = 5n^4.
T(2n+1,n+1) = (n+1)^(m+1)-n^(m+1) = (n+1)^5-n^5 = A022521(n).
Sum{k=0..n} T(n,k) = (16n^5+30n^4+15n^3-n)/30.
T(n+1,k+1)C(n,k)^5/(k+1)^4 = A197654(n,k).

A198062 Array read by antidiagonals, m>=0, n>=0, k>=0, A(m, n, k) = sum{j=0..m} sum{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 4, 2, 1, 0, 1, 1, 8, 3, 2, 1, 0, 1, 1, 16, 4, 4, 3, 1, 0, 1, 1, 32, 5, 8, 9, 3, 1, 0, 1, 1, 64, 6, 16, 27, 7, 3, 1, 0, 1, 1, 128, 7, 32, 81, 15, 7, 3, 1, 0, 1, 1, 256, 8, 64, 243, 31, 15, 9, 4, 1, 0, 1, 1, 512, 9
Offset: 0

Views

Author

Peter Luschny, Nov 02 2011

Keywords

Examples

			   [0] [1] [2]  [3] [4]  [5]  [6]  [7]  [8]  [9]
-------------------------------------------------
[0]  1   1   1    1   1    1    1    1    1    1    A000012
[1]  0   1   1    2   2    2    3    3    3    3    A003056
[2]  0   1   1    4   3    4    9    7    7    9    A073254
[3]  0   1   1    8   4    8   27   15   15   27    A198063
[4]  0   1   1   16   5   16   81   31   31   81    A198064
[5]  0   1   1   32   6   32  243   63   63  243    A198065
		

Crossrefs

Programs

  • Maple
    A198062_RowAsTriangle := proc(m) local pow; pow :=(a,b)->`if`(a=0 and b=0,1,a^b): proc(n, k) local i, j; add(add((-1)^(j + i)*binomial(i, j)*pow(n, j)* pow(k, m-j), i=0..m),j=0..m) end: end:
    for m from 0 to 2 do seq(print(seq(A198062_RowAsTriangle(m)(n,k),k=0..n)),n=0..5) od;
  • Mathematica
    max = 9; RowAsTriangle[m_][n_, k_] := Module[{pow}, pow[a_, b_] := If[a == 0 && b == 0, 1, a^b]; Module[{i, j}, Sum[Sum[(-1)^(j+i)*Binomial[i, j]*pow[n, j]*pow[k, m-j], {i, 0, m}], {j, 0, m}]]]; t = Flatten /@ Table[RowAsTriangle[m][n, k], {m, 0, max}, {n, 0, max}, {k, 0, n}]; Table[t[[n-k+1, k+1]], {n, 0, max}, {k, 0, n }] // Flatten (* Jean-François Alcover, Feb 25 2014, after Maple *)

Formula

A007318(n,k) = A(0,n+1,k+1)*C(n,k)^1/(k+1)^0,
A103371(n,k) = A(1,n+1,k+1)*C(n,k)^2/(k+1)^1,
A194595(n,k) = A(2,n+1,k+1)*C(n,k)^3/(k+1)^2,
A197653(n,k) = A(3,n+1,k+1)*C(n,k)^4/(k+1)^3,
A197654(n,k) = A(4,n+1,k+1)*C(n,k)^5/(k+1)^4,
A197655(n,k) = A(5,n+1,k+1)*C(n,k)^6/(k+1)^5.
Showing 1-5 of 5 results.