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!)
A220417 Table T(n,k) = k^n - n^k, n, k > 0, read by descending antidiagonals. 4
0, 1, -1, 2, 0, -2, 3, 1, -1, -3, 4, 0, 0, 0, -4, 5, -7, -17, 17, 7, -5, 6, -28, -118, 0, 118, 28, -6, 7, -79, -513, -399, 399, 513, 79, -7, 8, -192, -1844, -2800, 0, 2800, 1844, 192, -8, 9, -431, -6049, -13983, -7849, 7849, 13983, 6049, 431, -9, 10, -924, -18954, -61440, -61318, 0, 61318, 61440, 18954, 924, -10 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
As a linear array, the sequence is a(n) = A004736(n)^A002260(n) - A002260(n)^A004736(n) or
a(n) = ((t*t + 3*t + 4)/2 - n)^(n - t*(t + 1)/2) - (n - t*(t + 1)/2)^((t*t + 3*t + 4)/2 - n) where t = floor((-1 + sqrt(8*n - 7))/2).
EXAMPLE
The table T(n,k) (with rows n >= 1 and columns k >= 1) begins as follows:
0 1 2 3 4 5 ...
-1 0 1 0 -7 -28 ...
-2 -1 0 -17 -118 -513 ...
-3 0 17 0 -399 -2800 ...
-4 7 118 399 0 -7849 ...
-5 28 513 2800 7849 0 ...
...
The start of the sequence as a triangular array, read by rows (i.e., descending antidiagonals of T(n,k)), is as follows:
0;
1, -1;
2, 0, -2;
3, 1, -1, -3;
4, 0, 0, 0, -4;
5, -7, -17, 17, 7, -5;
6, -28, -118, 0, 118, 28, -6;
...
In the above triangle, row number m contains m numbers: m^1 - 1^m, (m-1)^2 - 2^(m-1), ..., 1^m - m^1.
PROG
(Python)
t=int((math.sqrt(8*n-7) - 1)/ 2)
m=((t*t+3*t+4)/2-n)**(n-t*(t+1)/2)-(n-t*(t+1)/2)**((t*t+3*t+4)/2-n)
(PARI) matrix(9, 9, n, k, k^n - n^k) \\ Michel Marcus, Oct 04 2019
CROSSREFS
Sequence in context: A330368 A194547 A257570 * A049581 A114327 A330240
KEYWORD
sign,tabl
AUTHOR
Boris Putievskiy, Dec 14 2012
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 May 21 17:21 EDT 2024. Contains 372738 sequences. (Running on oeis4.)