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

A051340 A simple 2-dimensional array, read by antidiagonals: T[i,j] = 1 for j>0, T[i,0] = i+1; i,j = 0,1,2,3,...

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Warning: contributions from Kimberling refer to an alternate version indexed by 1 instead of 0. Other contributors (Adamson in A125026/A130301/A130295) refer to this considering the upper right triangle set to zero, T[i,j]=0 for j>i. - M. F. Hasler, Aug 15 2015
From Clark Kimberling, Feb 05 2011: (Start)
A member of the accumulation chain:
... < A051340 < A141419 < A185874 < A185875 < A185876 < ...
(See A144112 for the definition of accumulation array.)
In the m-th accumulation array of A051340,
row_1 = C(m,1) and column_1 = C(1,m+1), for m>=0. (End)

Examples

			Northwest corner:
  1...1...1...1...1...1...1
  2...1...1...1...1...1...1
  3...1...1...1...1...1...1
  4...1...1...1...1...1...1
  5...1...1...1...1...1...1
  6...1...1...1...1...1...1
The Mathematica code shows that the weight array of this array (i.e., the array of which this array is the accumulation array), has northwest corner
  1....0...0...0...0...0...0
  1...-1...0...0...0...0...0
  1...-1...0...0...0...0...0
  1...-1...0...0...0...0...0
  1...-1...0...0...0...0...0. - _Clark Kimberling_, Feb 05 2011
		

Crossrefs

Programs

  • Magma
    [k eq n select n+1 else 1: k in [0..n], n in [0..15]]; // G. C. Greubel, Mar 18 2023
    
  • Maple
    A051340 := proc(n, k) if k=0 then n+1; else 1; end if; end proc: # R. J. Mathar, Jul 16 2015
  • Mathematica
    (* This program generates A051340, then its accumulation array A141419, then its weight array described under Example. *)
    f[n_,0]:=0; f[0,k_]:=0;  (* needed for the weight array *)
    f[n_,1]:=n; f[n_,k_]:=1/;k>1;
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]] (* A051340 *)
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    s[n_,k_]:=Sum[f[i,j],{i,1,n},{j,1,k}]; (* accumulation array of {f(n,k)} *)
    TableForm[Table[s[n,k],{n,1,10},{k,1,15}]] (* A141419 *)
    Table[s[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    w[m_,n_]:=f[m,n]+f[m-1,n-1]-f[m,n-1]-f[m-1,n]/;Or[m>0,n>0];
    TableForm[Table[w[n,k],{n,1,10},{k,1,15}]] (* weight array *)
    Table[w[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten (* Clark Kimberling, Feb 05 2011 *)
    f[n_] := Join[ Table[1, {n - 1}], {n}]; Array[ f, 14] // Flatten (* Robert G. Wilson v, Mar 04 2012 *)
    Table[PadLeft[{n},n,1],{n,15}]//Flatten (* Harvey P. Dale, Jun 17 2025 *)
  • Python
    from math import comb, isqrt
    def A051340(n):
        a = (m:=isqrt(k:=n+2<<1))+(k>m*(m+1))
        return 1 if n-comb(a,2)+1 else a-1 # Chai Wah Wu, Jun 21 2025
  • SageMath
    def A051340(n,k): return n+1 if (k==n) else 1
    flatten([[A051340(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Mar 18 2023
    

Formula

For n>0, a(n(n+3)/2)=n+1, and if k is not of the form n*(n+3)/2, then a(k)=1. - Benoit Cloitre, Oct 31 2002, corrected by M. F. Hasler, Aug 15 2015
T(n,0) = n+1 and T(n,k) = 1 if k >= 0, for n >= 0. - Clark Kimberling, Feb 05 2011

Extensions

Edited by M. F. Hasler, Aug 15 2015

A141419 Triangle read by rows: T(n, k) = A000217(n) - A000217(n - k) with 1 <= k <= n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 4, 7, 9, 10, 5, 9, 12, 14, 15, 6, 11, 15, 18, 20, 21, 7, 13, 18, 22, 25, 27, 28, 8, 15, 21, 26, 30, 33, 35, 36, 9, 17, 24, 30, 35, 39, 42, 44, 45, 10, 19, 27, 34, 40, 45, 49, 52, 54, 55
Offset: 1

Views

Author

Roger L. Bagula, Aug 05 2008

Keywords

Comments

As a rectangle, the accumulation array of A051340.
From Clark Kimberling, Feb 05 2011: (Start)
Here all the weights are divided by two where they aren't in Cahn.
As a rectangle, A141419 is in the accumulation chain
... < A051340 < A141419 < A185874 < A185875 < A185876 < ...
(See A144112 for the definition of accumulation array.)
row 1: A000027
col 1: A000217
diag (1,5,...): A000326 (pentagonal numbers)
diag (2,7,...): A005449 (second pentagonal numbers)
diag (3,9,...): A045943 (triangular matchstick numbers)
diag (4,11,...): A115067
diag (5,13,...): A140090
diag (6,15,...): A140091
diag (7,17,...): A059845
diag (8,19,...): A140672
(End)
Let N=2*n+1 and k=1,2,...,n. Let A_{N,n-1} = [0,...,0,1; 0,...,0,1,1; ...; 0,1,...,1; 1,...,1], an n X n unit-primitive matrix (see [Jeffery]). Let M_n=[A_{N,n-1}]^4. Then t(n,k)=[M_n](1,k), that is, the n-th row of the triangle is given by the first row of M_n. - _L. Edson Jeffery, Nov 20 2011
Conjecture. Let N=2*n+1 and k=1,...,n. Let A_{N,0}, A_{N,1}, ..., A_{N,n-1} be the n X n unit-primitive matrices (again see [Jeffery]) associated with N, and define the Chebyshev polynomials of the second kind by the recurrence U_0(x) = 1, U_1(x) = 2*x and U_r(x) = 2*x*U_(r-1)(x) - U_(r-2)(x) (r>1). Define the column vectors V_(k-1) = (U_(k-1)(cos(Pi/N)), U_(k-1)(cos(3*Pi/N)), ..., U_(k-1)(cos((2*n-1)*Pi/N)))^T, where T denotes matrix transpose. Let S_N = [V_0, V_1, ..., V_(n-1)] be the n X n matrix formed by taking V_(k-1) as column k-1. Let X_N = [S_N]^T*S_N, and let [X_N](i,j) denote the entry in row i and column j of X_N, i,j in {0,...,n-1}. Then t(n,k) = [X_N](k-1,k-1), and row n of the triangle is given by the main diagonal entries of X_N. Remarks: Hence t(n,k) is the sum of squares t(n,k) = sum[m=1,...,n (U_(k-1)(cos((2*m-1)*Pi/N)))^2]. Finally, this sequence is related to A057059, since X_N = [sum_{m=1,...,n} A057059(n,m)*A_{N,m-1}] is also an integral linear combination of unit-primitive matrices from the N-th set. - L. Edson Jeffery, Jan 20 2012
Row sums: n*(n+1)*(2*n+1)/6. - L. Edson Jeffery, Jan 25 2013
n-th row = partial sums of n-th row of A004736. - Reinhard Zumkeller, Aug 04 2014
T(n,k) is the number of distinct sums made by at most k elements in {1, 2, ... n}, for 1 <= k <= n, e.g., T(6,2) = the number of distinct sums made by at most 2 elements in {1,2,3,4,5,6}. The sums range from 1, to 5+6=11. So there are 11 distinct sums. - Derek Orr, Nov 26 2014
A number n occurs in this sequence A001227(n) times, the number of odd divisors of n, see A209260. - Hartmut F. W. Hoft, Apr 14 2016
Conjecture: 2*n + 1 is composite if and only if gcd(t(n,m),m) != 1, for some m. - L. Edson Jeffery, Jan 30 2018
From Peter Munn, Aug 21 2019 in respect of the sequence read as a triangle: (Start)
A number m can be found in column k if and only if A286013(m, k) is nonzero, in which case m occurs in column k on row A286013(m, k).
The first occurrence of m is in row A212652(m) column A109814(m), which is the rightmost column in which m occurs. This occurrence determines where m appears in A209260. The last occurrence of m is in row m column 1.
Viewed as a sequence of rows, consider the subsequences (of rows) that contain every positive integer. The lexicographically latest of these subsequences consists of the rows with row numbers in A270877; this is the only one that contains its own row numbers only once.
(End)

Examples

			As a triangle:
   1,
   2,  3,
   3,  5,  6,
   4,  7,  9, 10,
   5,  9, 12, 14, 15,
   6, 11, 15, 18, 20, 21,
   7, 13, 18, 22, 25, 27, 28,
   8, 15, 21, 26, 30, 33, 35, 36,
   9, 17, 24, 30, 35, 39, 42, 44, 45,
  10, 19, 27, 34, 40, 45, 49, 52, 54, 55;
As a rectangle:
   1   2   3   4   5   6   7   8   9  10
   3   5   7   9  11  13  15  17  19  21
   6   9  12  15  18  21  24  27  30  33
  10  14  18  22  26  30  34  38  42  46
  15  20  25  30  35  40  45  50  55  60
  21  27  33  39  45  51  57  63  69  75
  28  35  42  49  56  63  70  77  84  91
  36  44  52  60  68  76  84  92 100 108
  45  54  63  72  81  90  99 108 117 126
  55  65  75  85  95 105 115 125 135 145
Since the odd divisors of 15 are 1, 3, 5 and 15, number 15 appears four times in the triangle at t(3+(5-1)/2, 5) in column 5 since 5+1 <= 2*3, t(5+(3-1)/2, 3), t(1+(15-1)/2, 2*1) in column 2 since 15+1 > 2*1, and t(15+(1-1)/2, 1). - _Hartmut F. W. Hoft_, Apr 14 2016
		

References

  • R. N. Cahn, Semi-Simple Lie Algebras and Their Representations, Dover, NY, 2006, ISBN 0-486-44999-8, p. 139.

Crossrefs

Cf. A000330 (row sums), A004736, A057059, A070543.
A144112, A051340, A141419, A185874, A185875, A185876 are accumulation chain related.
A141418 is a variant.
Cf. A001227, A209260. - Hartmut F. W. Hoft, Apr 14 2016
A109814, A212652, A270877, A286013 relate to where each natural number appears in this sequence.
A000027, A000217, A000326, A005449, A045943, A059845, A115067, A140090, A140091, A140672 are rows, columns or diagonals - refer to comments.

Programs

  • Haskell
    a141419 n k =  k * (2 * n - k + 1) `div` 2
    a141419_row n = a141419_tabl !! (n-1)
    a141419_tabl = map (scanl1 (+)) a004736_tabl
    -- Reinhard Zumkeller, Aug 04 2014
  • Maple
    a:=(n,k)->k*n-binomial(k,2): seq(seq(a(n,k),k=1..n),n=1..12); # Muniru A Asiru, Oct 14 2018
  • Mathematica
    T[n_, m_] = m*(2*n - m + 1)/2; a = Table[Table[T[n, m], {m, 1, n}], {n, 1, 10}]; Flatten[a]

Formula

t(n,m) = m*(2*n - m + 1)/2.
t(n,m) = A000217(n) - A000217(n-m). - L. Edson Jeffery, Jan 16 2013
Let v = d*h with h odd be an integer factorization, then v = t(d+(h-1)/2, h) if h+1 <= 2*d, and v = t(d+(h-1)/2, 2*d) if h+1 > 2*d; see A209260. - Hartmut F. W. Hoft, Apr 14 2016
G.f.: y*(-x + y)/((-1 + x)^2*(-1 + y)^3). - Stefano Spezia, Oct 14 2018
T(n, 2) = A060747(n) for n > 1. T(n, 3) = A008585(n - 1) for n > 2. T(n, 4) = A016825(n - 2) for n > 3. T(n, 5) = A008587(n - 2) for n > 4. T(n, 6) = A016945(n - 3) for n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7.r n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7. T(n, 9) = A008591(n - 4) for n > 8. T(n, 10) = A017329(n - 5) for n > 9. T(n, 11) = A008593(n - 5) for n > 10. T(n, 12) = A017593(n - 6) for n > 11. T(n, 13) = A008595(n - 6) for n > 12. T(n, 14) = A147587(n - 7) for n > 13. T(n, 15) = A008597(n - 7) for n > 14. T(n, 16) = A051062(n - 8) for n > 15. T(n, 17) = A008599(n - 8) for n > 16. - Stefano Spezia, Oct 14 2018
T(2*n-k, k) = A070543(n, k). - Peter Munn, Aug 21 2019

Extensions

Simpler name by Stefano Spezia, Oct 14 2018

A185874 Second accumulation array of A051340, by antidiagonals.

Original entry on oeis.org

1, 3, 4, 6, 11, 10, 10, 21, 26, 20, 15, 34, 48, 50, 35, 21, 50, 76, 90, 85, 56, 28, 69, 110, 140, 150, 133, 84, 36, 91, 150, 200, 230, 231, 196, 120, 45, 116, 196, 270, 325, 350, 336, 276, 165, 55, 144, 248, 350, 435, 490, 504, 468, 375, 220, 66, 175, 306, 440, 560, 651, 700, 696, 630, 495, 286, 78, 209, 370, 540, 700, 833, 924, 960, 930, 825, 638, 364, 91, 246, 440, 650, 855, 1036, 1176, 1260, 1275, 1210, 1056, 806, 455, 105, 286, 516, 770, 1025, 1260, 1456, 1596, 1665, 1650, 1540, 1326, 1001, 560
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

A member of the accumulation chain: A051340 < A141419 < A185874 < A185875 < A185876 < ... (See A144112 for the definition of accumulation array.)

Examples

			Northwest corner:
.   1,   3,   6,   10,   15,   21,   28,   36,   45,   55, ...
.   4,  11,  21,   34,   50,   69,   91,  116,  144,  175, ...
.  10,  26,  48,   76,  110,  150,  196,  248,  306,  370, ...
.  20,  50,  90,  140,  200,  270,  350,  440,  540,  650, ...
.  35,  85, 150,  230,  325,  435,  560,  700,  855, 1025, ...
.  56, 133, 231,  350,  490,  651,  833, 1036, 1260, 1505, ...
.  84, 196, 336,  504,  700,  924, 1176, 1456, 1764, 2100, ...
. 120, 276, 468,  696,  960, 1260, 1596, 1968, 2376, 2820, ...
. 165, 375, 630,  930, 1275, 1665, 2100, 2580, 3105, 3675, ...
. 220, 495, 825, 1210, 1650, 2145, 2695, 3300, 3960, 4675, ...
...
		

Crossrefs

Row 1 to 5: A000217, A115056, 2*A140096, 10*A000096, 5*A059845.
Column 1 to 3: A000292, A051925, A267370 and 3*A005581.
Main diagonal: A117066.

Programs

  • Mathematica
    f[n_, k_] := (1/12)*k*n*(1 + n)*(1 + 3*k + 2*n);
    TableForm[Table[f[n, k], {n, 1, 10}, {k, 1, 15}]]
    Table[f[n - k + 1, k], {n, 14}, {k, n, 1, -1}] // Flatten

Formula

T(n,k) = k*n*(n+1)*(2*n+3*k+1)/12 for k>=1, n>=1.

Extensions

Edited by Bruno Berselli, Jan 14 2016

A185875 Third accumulation array of A051340, by antidiagonals.

Original entry on oeis.org

1, 4, 5, 10, 19, 15, 20, 46, 55, 35, 35, 90, 130, 125, 70, 56, 155, 250, 290, 245, 126, 84, 245, 425, 550, 560, 434, 210, 120, 364, 665, 925, 1050, 980, 714, 330, 165, 516, 980, 1435, 1750, 1820, 1596, 1110, 495, 220, 705, 1380, 2100, 2695, 3010, 2940, 2460, 1650, 715, 286, 935, 1875, 2940, 3920, 4606, 4830, 4500, 3630, 2365, 1001, 364, 1210, 2475, 3975, 5460, 6664, 7350, 7350, 6600, 5170
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

A member of the accumulation chain A051340 < A141419 < A185874 < A185875 < A185876 < ... (See A144112 for the definition of accumulation array.)

Examples

			Northwest corner:
   1,   4,  10,  20,  35
   5,  19,  46,  90, 155
  15,  55, 130, 250, 425
  35, 125, 290, 550, 925
		

Crossrefs

Row 1: A000292; Column 1: A000332.

Programs

  • Mathematica
    f[n_,k_]:= k*(1+k)*n*(1+n)*(2+n)*(5+4*k+3*n)/144;
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten

Formula

T(n,k) = (3*n+4*k+5)*C(k,2)*C(n,3)/12, k>=1, n>=1.
Showing 1-4 of 4 results.