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.

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.

This page as a plain text file.
%I A157654 #8 Sep 08 2022 08:45:42
%S A157654 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,
%T A157654 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,
%U A157654 12,16,1
%N 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.
%C A157654 For the cases of m = 0, 1 the triangles reduce to T(n, k, m) = A103451(n, k). - _G. C. Greubel_, Dec 13 2021
%H A157654 G. C. Greubel, <a href="/A157654/b157654.txt">Rows n = 0..50 of the triangle, flattened</a>
%F A157654 T(n, k, m) = 1 if k = 0 or k = n, otherwise m*abs( (n-k)^(m-1) - k^(m-1) ), with m = 2.
%F A157654 From _G. C. Greubel_, Dec 13 2021: (Start)
%F A157654 Sum_{k=0..n} T(n, k, 2) = (-1)*[n==0] + A244800(n-1).
%F A157654 T(2*n, n, 2) = A000007(n). (End)
%e A157654 Triangle begins as:
%e A157654   1;
%e A157654   1,  1;
%e A157654   1,  0,  1;
%e A157654   1,  2,  2,  1;
%e A157654   1,  4,  0,  4,  1;
%e A157654   1,  6,  2,  2,  6,  1;
%e A157654   1,  8,  4,  0,  4,  8,  1;
%e A157654   1, 10,  6,  2,  2,  6, 10,  1;
%e A157654   1, 12,  8,  4,  0,  4,  8, 12,  1;
%e A157654   1, 14, 10,  6,  2,  2,  6, 10, 14,  1;
%e A157654   1, 16, 12,  8,  4,  0,  4,  8, 12, 16, 1;
%t A157654 T[n_, k_, m_]:= T[n, k, m]= If[k==0 || k==n, 1, m*Abs[(n-k)^(m-1) - k^(m-1)]];
%t A157654 Table[T[n,k,2], {n,0,15}, {k,0,n}]//Flatten
%o A157654 (Magma)
%o A157654 T:= func< n,k,q | k eq 0 or k eq n select 1 else q*Abs( (n-k)^(q-1) - k^(q-1) ) >;
%o A157654 [T(n,k,2): k in [0..n], n in [0..15]]; // _G. C. Greubel_, Dec 13 2021
%o A157654 (Sage)
%o A157654 def A157684(n,k,q): return 1 if (k==0 or k==n) else q*abs((n-k)^(q-1) - k^(q-1))
%o A157654 flatten([[A157684(n,k,2) for k in (0..n)] for n in (0..15)]) # _G. C. Greubel_, Dec 13 2021
%Y A157654 Cf. A000007, A103451, A244800.
%K A157654 nonn,tabl
%O A157654 0,8
%A A157654 _Roger L. Bagula_, Mar 03 2009
%E A157654 Edited by _G. C. Greubel_, Dec 13 2021