login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A157654
Triangle T(n, k, m) = 1 if k = 0 or k = n, otherwise m*abs( (n-k)^(m-1) - k^(m-1) ), with m = 2, read by rows.
1
1, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 4, 0, 4, 1, 1, 6, 2, 2, 6, 1, 1, 8, 4, 0, 4, 8, 1, 1, 10, 6, 2, 2, 6, 10, 1, 1, 12, 8, 4, 0, 4, 8, 12, 1, 1, 14, 10, 6, 2, 2, 6, 10, 14, 1, 1, 16, 12, 8, 4, 0, 4, 8, 12, 16, 1
OFFSET
0,8
COMMENTS
For the cases of m = 0, 1 the triangles reduce to T(n, k, m) = A103451(n, k). - G. C. Greubel, Dec 13 2021
FORMULA
T(n, k, m) = 1 if k = 0 or k = n, otherwise m*abs( (n-k)^(m-1) - k^(m-1) ), with m = 2.
From G. C. Greubel, Dec 13 2021: (Start)
Sum_{k=0..n} T(n, k, 2) = (-1)*[n==0] + A244800(n-1).
T(2*n, n, 2) = A000007(n). (End)
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 0, 1;
1, 2, 2, 1;
1, 4, 0, 4, 1;
1, 6, 2, 2, 6, 1;
1, 8, 4, 0, 4, 8, 1;
1, 10, 6, 2, 2, 6, 10, 1;
1, 12, 8, 4, 0, 4, 8, 12, 1;
1, 14, 10, 6, 2, 2, 6, 10, 14, 1;
1, 16, 12, 8, 4, 0, 4, 8, 12, 16, 1;
MATHEMATICA
T[n_, k_, m_]:= T[n, k, m]= If[k==0 || k==n, 1, m*Abs[(n-k)^(m-1) - k^(m-1)]];
Table[T[n, k, 2], {n, 0, 15}, {k, 0, n}]//Flatten
PROG
(Magma)
T:= func< n, k, q | k eq 0 or k eq n select 1 else q*Abs( (n-k)^(q-1) - k^(q-1) ) >;
[T(n, k, 2): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 13 2021
(Sage)
def A157684(n, k, q): return 1 if (k==0 or k==n) else q*abs((n-k)^(q-1) - k^(q-1))
flatten([[A157684(n, k, 2) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Dec 13 2021
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Mar 03 2009
EXTENSIONS
Edited by G. C. Greubel, Dec 13 2021
STATUS
approved