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-8 of 8 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

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

Original entry on oeis.org

1, 4, 1, 15, 30, 1, 40, 324, 120, 1, 85, 2080, 3120, 340, 1, 156, 9375, 40000, 18750, 780, 1, 259, 32886, 328125, 437500, 82215, 1554, 1, 400, 96040, 1959216, 6002500, 3265360, 288120, 2800, 1
Offset: 0

Views

Author

Susanne Wienand, Oct 17 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 = 4.
The values in the triangle are proved by brute force for 0 <= n <= 8. The formulas are not yet proved in general.
The number triangle can be calculated recursively by the number triangles A007318, A103371 and A194595. The first column of the triangle seems to be A053698. The diagonal right hand is A000012. The diagonal with k = n-1 seems to be A027445. Row sums are in A198256.
The conjectured formulas are confirmed by dynamic programming for 0 <= n <= 43. - Susanne Wienand, Jun 29 2015

Examples

			For n = 4 and k = 2, T(4,4,2) = 3120.
Recursive example:
T(1,4,0) = 1,
T(1,4,1) = 4,
T(1,4,2) = 6,
T(1,4,3) = 4,
T(1,4,4) = 1,
T(3,4,0) = 21,
T(3,4,1) = 304,
T(3,4,2) = 456,
T(3,4,3) = 84,
T(3,4,1) = 1,
T(4,4,2) = 6^4 + 6*304 = 3120.
Example for closed formula:
T(4,2) = 6^4 + 6^3 * 4 + 6^2 * 4^2 + 6 * 4^3 = 3120.
Some examples of list S and allocated values of dir if n = 4 and k = 2:
Length(S) = (4+1)*4 = 20 and S contains (2+1)*4 = 12 Ls.
  S: L,L,L,L,L,L,L,L,L,L,L,L,R,R,R,R,R,R,R,R
dir: 1,2,3,0,1,2,3,0,1,2,3,0,0,3,2,1,0,3,2,1
  S: L,L,L,R,L,L,R,L,L,R,R,L,L,L,R,L,L,R,R,R
dir: 1,2,3,3,3,0,0,0,1,1,0,0,1,2,2,2,3,3,2,1
  S: L,R,L,L,L,L,R,R,R,L,L,R,R,L,L,L,R,L,L,R
dir: 1,1,1,2,3,0,0,3,2,2,3,3,2,2,3,0,0,0,1,1
Each value of dir occurs 20/4 = 5 times.
Triangle begins:
   1;
   4,    1;
  15,   30,    1;
  40,  324,  120,   1;
  85, 2080, 3120, 340, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A197653 := (n,k) -> binomial(n,k)^4*(n+1)*(n^2-2*n*k+1+2*k+2*k^2)/((1+k)^3);
    seq(print(seq(A197653(n, k), k=0..n)), n=0..7); # Peter Luschny, Oct 19 2011
  • Mathematica
    T[n_, k_] := Binomial[n, k]^4 (n+1)(n^2 - 2n*k + 1 + 2k + 2k^2)/((1+k)^3);
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 30 2018, after Peter Luschny *)
  • PARI
    A197653(n,k) = {if(n==1+2*k,4,(1+k)*(1-((n-k)/(1+k))^4)/(1+2*k-n))*binomial(n,k)^4} \\ 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 A197653(n,k) : return S(3,n,k)
    for n in (0..5) : print([A197653(n,k) for k in (0..n)])  ## Peter Luschny, Oct 24 2011
    

Formula

Recursive formula (conjectured):
T(n,k) = T(4,n,k)
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(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, k < n
A = (C(n,k))^4
B = (C(n,k))^3 * C(n,n-1-k)
C = (C(n,k))^2 *(C(n,n-1-k))^2
D = C(n,k) *(C(n,n-1-k))^3
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,3). - Peter Luschny, Oct 20 2011
T(n,k) = A198063(n+1,k+1)*C(n,k)^4/(k+1)^3. - Peter Luschny, Oct 29 2011
T(n,k) = h(n,k)*binomial(n,k)^4, where h(n,k) = (1+k)*(1-((n-k)/(1+k))^4)/(1+2*k-n) if 1+2*k-n <> 0, otherwise h(n,k) = 4. - 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).

A198065 Triangle read by rows (n >= 0, 0 <= k <= n, m = 5); 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, 32, 6, 32, 243, 63, 63, 243, 1024, 364, 192, 364, 1024, 3125, 1365, 665, 665, 1365, 3125, 7776, 3906, 2016, 1458, 2016, 3906, 7776, 16807, 9331, 5187, 3367, 3367, 5187, 9331, 16807, 32768, 19608, 11648, 7448, 6144, 7448, 11648, 19608, 32768, 59049
Offset: 0

Views

Author

Peter Luschny, Oct 26 2011

Keywords

Examples

			[0]                        0
[1]                       1, 1
[2]                    32, 6, 32
[3]                 243, 63, 63, 243
[4]            1024, 364, 192, 364, 1024
[5]         3125, 1365, 665, 665, 1365, 3125
[6]     7776, 3906, 2016, 1458, 2016, 3906, 7776
[7] 16807, 9331, 5187, 3367, 3367, 5187, 9331, 16807
		

Crossrefs

Programs

  • Magma
    &cat[[n*(k^2-k*n+n^2)*(3*k^2-3*k*n+n^2): k in [0..n]]: n in [0..9]];  // Bruno Berselli, Nov 02 2011
  • Maple
    A198065 := (n,k) -> 3*n*k^4-6*k^3*n^2+7*k^2*n^3-4*k*n^4+n^5:

Formula

T(n,k) = 3*n*k^4-6*k^3*n^2+7*k^2*n^3-4*k*n^4+n^5.
T(n,0) = T(n,n) = n^m = n^5 = A000584(n).
T(2n,n) = (m+1)n^m = 6n^5.
T(2n+1,n+1) = (n+1)^(m+1)-n^(m+1) = (n+1)^6-n^6 = A022522(n).
Sum{k=0..n} T(n,k) = (13n^6+30n^5+20n^4-3n^2)/30.
T(n+1,k+1)C(n,k)^6/(k+1)^5 = A197655(n,k).

A321500 Triangular table T(n,k) = (n+k)*(n^2+k^2), n >= k >= 0; read by rows n = 0, 1, 2, ...

Original entry on oeis.org

0, 1, 4, 8, 15, 32, 27, 40, 65, 108, 64, 85, 120, 175, 256, 125, 156, 203, 272, 369, 500, 216, 259, 320, 405, 520, 671, 864, 343, 400, 477, 580, 715, 888, 1105, 1372, 512, 585, 680, 803, 960, 1157, 1400, 1695, 2048
Offset: 0

Views

Author

M. F. Hasler, Nov 22 2018

Keywords

Examples

			The table starts:
n | T(n,k), k = 0..n:
0 |   0;
1 |   1,   4;
2 |   8,  15,  32;
3 |  27,  40,  65, 108;
4 |  64,  85, 120, 175, 256;
5 | 125, 156, 203, 272, 369,  500;
6 | 216, 259, 320, 405, 520,  671,  864;
7 | 343, 400, 477, 580, 715,  888, 1105, 1372;
8 | 512, 585, 680, 803, 960, 1157, 1400, 1695, 2048;
etc.
		

Crossrefs

Cf. A000578 (column 0: the cubes), A033430 (diagonal: 4*n^3), A053698 (column 1).
Cf. A198063 (read as A(n,k)=(n+k)*(n^2+k^2)).

Programs

  • Magma
    [[(n+k)*(n^2+k^2): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Nov 23 2018
    
  • Mathematica
    t[n_, k_] := (n + k) (n^2 + k^2); Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    A321500(n, k)=(n+k)*(n^2+k^2)
    A321500_row(n)=vector(n+1, k, (n+k--)*(n^2+k^2))
    A321500_list(N=11)=concat(apply(A321500_row, [0..N]))
    
  • Sage
    [[(n+k)*(n^2+k^2) for k in range(n+1)] for n in range(12)] # G. C. Greubel, Nov 23 2018

Formula

Sum_{k=0..n} T(n,k) = 5*n^2*(n+1)*(5*n+1)/12 = 5*A117066(n). - G. C. Greubel, Nov 23 2018

A348897 Numbers of the form (x + y)*(x^2 + y^2).

Original entry on oeis.org

0, 1, 4, 8, 15, 27, 32, 40, 64, 65, 85, 108, 120, 125, 156, 175, 203, 216, 256, 259, 272, 320, 343, 369, 400, 405, 477, 500, 512, 520, 580, 585, 671, 680, 715, 729, 803, 820, 864, 888, 935, 960, 1000, 1080, 1105, 1111, 1157, 1248, 1261, 1331, 1372, 1400, 1417
Offset: 1

Views

Author

Peter Luschny, Nov 10 2021

Keywords

Comments

Also numbers of the form (x - i*y)*(x + i*y)*(x + y).
Loeschian numbers of this form are A349200.
A349201 and A349202 are subsequences of this sequence.
Numbers of the form 1 + n + n^2 + n^3 (A053698) are a subsequence.
Numbers of the form n^3 + n^4 + n^5 + n^6 are a subsequence.
Numbers of the form 1 + n^2 + n^4 + n^6 (A059830) are a subsequence. - Bernard Schott, Nov 11 2021

Examples

			1010101 is in this sequence because 1010101 = (100 + 1)*(100^2 + 1^2).
		

Crossrefs

Programs

  • Julia
    # Returns the terms less than or equal to b^3.
    function A348897List(b)
        b3 = b^3; R = [0]
        for n in 1:b
            for k in 0:n
                a = (n + k) * (n^2 + k^2)
                a > b3 && break
                push!(R, a)
        end end
    unique!(sort!(R)) end
    A348897List(12) |> println
  • Maple
    # Returns the terms less than or equal to b^3.
    A348897List := proc(b) local n, k, a, b3, R;
    b3 := abs(b^3); R := {};
    for n from 0 to b do for k from 0 to n do
        a := (n + k)*(n^2 + k^2);
        if a > b3 then break fi;
        R := R union {a};
    od od; sort(R) end:
    A348897List(12);
  • Mathematica
    max = 2000;
    xmax = max^(1/3) // Ceiling;
    Table[(x + y) (x^2 + y^2), {x, 0, xmax}, {y, x, xmax}] // Flatten // Union // Select[#, # <= max&]& (* Jean-François Alcover, Oct 23 2023 *)

A321490 Triangular table T[n,k] = (n+k)(n^2+k^2), 1 <= k <= n = 1, 2, 3, ...; read by rows.

Original entry on oeis.org

4, 15, 32, 40, 65, 108, 85, 120, 175, 256, 156, 203, 272, 369, 500, 259, 320, 405, 520, 671, 864, 400, 477, 580, 715, 888, 1105, 1372, 585, 680, 803, 960, 1157, 1400, 1695, 2048, 820, 935, 1080, 1261, 1484, 1755, 2080, 2465, 2916, 1111, 1248, 1417, 1624, 1875, 2176, 2533, 2952, 3439, 4000, 1464, 1625, 1820, 2055, 2336
Offset: 1

Views

Author

M. F. Hasler, Nov 22 2018

Keywords

Examples

			The table starts:
Row 1:    4;
Row 2:   15,  32;
Row 3:   40,  65, 108;
Row 4:   85, 120, 175, 256;
Row 5:  156, 203, 272, 369,  500;
Row 6:  259, 320, 405, 520,  671,  864;
Row 7:  400, 477, 580, 715,  888, 1105, 1372;
Row 8:  585, 680, 803, 960, 1157, 1400, 1695, 2048;
etc.
		

Crossrefs

Cf. A321491 (numbers of the form T(n,k) with n > k > 0).
Cf. A321492 (numbers which can be written at least twice in this form).
Cf. A033430 (diagonal), A053698 (column 1).
Cf. A198063 (read as a square array equals T(n,k) for all n, k >= 0).
Cf. A321500 (variant of this table with additional row 0 and column 0).

Programs

  • Mathematica
    t[n_, k_] := (n + k) (n^2 + k^2); Table[t[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    A321490(n,k)=(n+k)*(n^2+k^2)
    A321490_row(n)=vector(n,k,(n+k)*(n^2+k^2))
    A321490_list(N=12)=concat(apply(A321490_row,[1..N]))

Formula

Diagonal: T(n,n) = 4*n^3 = A033430(n).
Column 1: T(n,1) = (n + 1)(n^2 + 1) = A053698(n) = (n^4-1)/(n-1) for n > 1.

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