The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; table; graph; refs; listen; history; text; internal format)
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
LINKS
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
Sequence in context: A342061 A045995 A360625 * A357437 A078692 A273432
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Mar 03 2009
EXTENSIONS
Edited by G. C. Greubel, Dec 13 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 19:21 EDT 2024. Contains 373134 sequences. (Running on oeis4.)