[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a055651 -id:a055651
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = n^(n+1) - (n+1)^n.
+10
19
-1, -1, -1, 17, 399, 7849, 162287, 3667649, 91171007, 2486784401, 74062575399, 2395420006033, 83695120256591, 3143661612445145, 126375169532421599, 5415486851106043649, 246486713303685957375, 11877172892329028459041, 604107995057426434824791
OFFSET
0,4
COMMENTS
From Mathew Englander, Jul 07 2020: (Start)
All a(n) are odd and for n even, a(n) == 3 (mod 4); for n odd and n != 1, a(n) == 1 (mod 4).
The correspondence between n and a(n) when considered mod 6 is as follows: for n == 0, 1, 2, or 3, a(n) == 5; for n == 4, a(n) == 3; for n == 5, a(n) == 1.
For all n, a(n)+1 is a multiple of n^2.
For n odd and n >= 3, a(n)-1 is a multiple of (n+1)^2.
For n even and n >= 0, a(n)+1 is a multiple of (n+1)^2.
For proofs of the above, see the Englander link. (End)
REFERENCES
G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
LINKS
Mathew Englander, Notes on OEIS A007925
Sergio Silva, Teste Numerico, Item 3.
FORMULA
Asymptotic expression for a(n) is a(n) ~ n^n * (n - e). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 19 2001
From Mathew Englander, Jul 07 2020: (Start)
a(n) = A111454(n+4) - 1.
a(n) = A055651(n, n+1).
a(n) = A220417(n+1, n) for n >= 1.
a(n) = A007778(n) - A000169(n+1).
(End)
E.g.f.: LambertW(-x)/((1+LambertW(-x))*x)-LambertW(-x)/(1+LambertW(-x))^3. - Alois P. Heinz, Jul 04 2022
EXAMPLE
a(2) = 1^2 - 2^1 = -1,
a(4) = 3^4 - 4^3 = 17.
MAPLE
A007925:=n->n^(n+1)-(n+1)^n: seq(A007925(n), n=0..25); # Wesley Ivan Hurt, Jan 10 2017
MATHEMATICA
lst={}; Do[AppendTo[lst, (n^(n+1)-((n+1)^n))], {n, 0, 4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 19 2008 *)
#^(#+1)-(#+1)^#&/@Range[0, 20] (* Harvey P. Dale, Oct 22 2011 *)
PROG
(Maxima) A007925[n]:=n^(n+1)-(n+1)^n$ makelist(A007925[n], n, 0, 30); /* Martin Ettl, Oct 29 2012 */
(PARI) a(n)=n^(n+1)-(n+1)^n \\ Charles R Greathouse IV, Feb 06 2017
KEYWORD
sign,easy,nice
AUTHOR
Dennis S. Kluk (mathemagician(AT)ameritech.net)
STATUS
approved
Primes of the form x^y - y^x, for x,y > 1.
+10
7
7, 17, 79, 431, 58049, 130783, 162287, 523927, 2486784401, 6102977801, 8375575711, 13055867207, 83695120256591, 375700268413577, 2251799813682647, 9007199254738183, 79792265017612001, 1490116119372884249
OFFSET
1,1
COMMENTS
These are the primes in A045575, numbers of the form x^y - y^x, for x,y > 1. This includes all primes from A122735, smallest prime of the form (n^k - k^n) for k>1.
If y=1 was allowed, any prime p could be obtained for x=p+1. This motivates to consider sequence A243100 of primes of the form x^(y+1)-y^x. - M. F. Hasler, Aug 19 2014
LINKS
T. D. Noe, Table of n, a(n) for n=1..101 (terms < 10^400)
H. Lifchitz & R. Lifchitz, PRP of the form x^y-y^x on primenumbers.net.
EXAMPLE
The primes 6102977801 and 1490116119372884249 are of the form 5^y-y^5 (for y=14 and y=26) and therefore members of this sequence. The next larger primes of this form would have y > 4500 and would be much too large to be included. - M. F. Hasler, Aug 19 2014
MAPLE
N:= 10^100: # to get all terms <= N
A:= NULL:
for x from 2 while x^(x+1) - (x+1)^x <= N do
for y from x+1 do
z:= x^y - y^x;
if z > N then break
elif z > 0 and isprime(z) then A:=A, z;
fi
od od:
{A}; # Robert Israel, Aug 29 2014
MATHEMATICA
Take[Select[Intersection[Flatten[Table[Abs[x^y-y^x], {x, 2, 120}, {y, 2, 120}]]], PrimeQ[ # ]&], 25]
nn=10^50; n=1; t=Union[Reap[While[n++; k=n+1; num=Abs[n^k-k^n]; num<nn, Sow[num]; While[k++; num=n^k-k^n; num<nn, Sow[num]]]][[2, 1]]]; Select[t, PrimeQ]
With[{nn=30}, Take[Sort[Select[#[[1]]^#[[2]]-#[[2]]^#[[1]]&/@Subsets[ Range[ 2nn], {2}], #>0&&PrimeQ[#]&]], nn]] (* Harvey P. Dale, Nov 23 2013 *)
PROG
(PARI) a=[]; for(S=1, 199, for(x=2, S-2, ispseudoprime(p=x^(y=S-x)-y^x)&&a=concat(a, p))); Set(a) \\ May be incomplete in the upper range of values, i.e., beyond a given S=x+y, a larger S may yield a smaller prime (for small x). - M. F. Hasler, Aug 19 2014
CROSSREFS
A163319 is the subsequences for fixed x=3, A243114 for x=6.
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Oct 04 2006
STATUS
approved
Table T(m,k)=m^k+k^m (with 0^0 taken to be 1) as square array read by antidiagonals.
+10
6
2, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 8, 4, 1, 1, 5, 17, 17, 5, 1, 1, 6, 32, 54, 32, 6, 1, 1, 7, 57, 145, 145, 57, 7, 1, 1, 8, 100, 368, 512, 368, 100, 8, 1, 1, 9, 177, 945, 1649, 1649, 945, 177, 9, 1, 1, 10, 320, 2530, 5392, 6250, 5392, 2530, 320, 10, 1, 1, 11, 593, 7073
OFFSET
0,1
FORMULA
E.g.f. Sum(n,m, T(n,m)/(n! m!)) = e^(x e^y) + e^(y e^x). [From Franklin T. Adams-Watters, Oct 26 2009]
CROSSREFS
Columns and rows are A000012 (apart from first term), A000027, A001580, A001585, A001589, A001593 etc. Diagonals include A013499 (apart from first two terms), A051442, A051489.
Cf. A055651.
Contribution from Franklin T. Adams-Watters, Oct 26 2009: (Start)
Main diagonal is 2 * A000312. More diagonals: A051442, A051489, A155539.
Cf. A076980, A156353, A156354. (End)
KEYWORD
easy,nonn,tabl
AUTHOR
Henry Bottomley, Jun 08 2000
STATUS
approved
Array A(n, k) = n^k * k^n, n, k >= 0, read by antidiagonals.
+10
4
1, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 16, 3, 0, 0, 4, 72, 72, 4, 0, 0, 5, 256, 729, 256, 5, 0, 0, 6, 800, 5184, 5184, 800, 6, 0, 0, 7, 2304, 30375, 65536, 30375, 2304, 7, 0, 0, 8, 6272, 157464, 640000, 640000, 157464, 6272, 8, 0, 0, 9, 16384, 750141, 5308416, 9765625
OFFSET
0,8
COMMENTS
Here 0^0 is defined to be 1. - Wolfdieter Lang, May 27 2018
FORMULA
From Wolfdieter Lang, May 22 2018: (Start)
As a sequence: a(n) = A003992(n)*A004248(n).
As a triangle: T(n, k) = (n-k)^k * k^(n-k), for n >= 1 and k = 1..n. (End)
EXAMPLE
A(3, 2) = 3^2 * 2^3 = 9*8 = 72.
The array A(n, k) begins:
n\k 0 1 2 3 4 5 6 7 8 9 10 ...
0: 1 0 0 0 0 0 0 0 0 0 0 ...
1: 0 1 2 3 4 5 6 7 8 9 10 ...
2: 0 2 16 72 256 800 2304 6272 16384 41472 102400 ...
3: 0 3 72 729 5184 30375 157464 750141 3359232 14348907 59049000 ...
...
The triangle T(n, k) begins:
n\k 0 1 2 3 4 5 6 7 8 9 ...
0: 1
1: 0 0
2: 0 1 0
3: 0 2 2 0
4: 0 3 16 3 0
5: 0 4 72 72 4 0
6: 0 5 256 729 256 5 0
7: 0 6 800 5184 5184 800 6 0
8: 0 7 2304 30375 65536 30375 2304 7 0
9: 0 8 6272 157464 640000 640000 157464 6272 8 0
... - Wolfdieter Lang, May 22 2018
MATHEMATICA
{{1}}~Join~Table[(#^k k^#) &[n - k], {n, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, May 24 2018 *)
PROG
(PARI) t1(n)=n-binomial(round(sqrt(2+2*n)), 2)
t2(n)=binomial(floor(3/2+sqrt(2+2*n)), 2)-(n+1)
a(n)=t1(n)^t2(n)*t2(n)^t1(n) \\ Eric Chen, Jun 09 2018
CROSSREFS
Columns and rows of A, or columns and diagonals of T, include A000007, A001477, A007758, A062074, A062075 etc. Diagonals of A include A062206, A051443, A051490. Sum of rows of T are A062817(n), for n >= 1
KEYWORD
nonn,tabl,easy
AUTHOR
Henry Bottomley, Jul 02 2001
STATUS
approved
Table T(n,k) = k^n - n^k, n, k > 0, read by descending antidiagonals.
+10
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
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
KEYWORD
sign,tabl
AUTHOR
Boris Putievskiy, Dec 14 2012
STATUS
approved
Triangle read by rows: T(n, k) = abs(n^k-k^n), 1<=k<=n.
+10
2
0, 1, 0, 2, 1, 0, 3, 0, 17, 0, 4, 7, 118, 399, 0, 5, 28, 513, 2800, 7849, 0, 6, 79, 1844, 13983, 61318, 162287, 0, 7, 192, 6049, 61440, 357857, 1417472, 3667649, 0, 8, 431, 18954, 255583, 1894076, 9546255, 35570638, 91171007, 0, 9, 924, 58049, 1038576
OFFSET
1,4
COMMENTS
Aside from n = k, the only zero in this triangle corresponds to a(4, 2). [From Alonso del Arte, Jul 09 2009]
EXAMPLE
0
1 0
2 1 0
3 0 17 0
4 7 118 399 0
5 28 513 2800 7849 0
...
MATHEMATICA
a[n_, k_] := a[n, k] = n^k - k^n; ColumnForm[Table[Abs[a[n, k]], {n, 10}, {k, n}], Center] (* Alonso del Arte, Jul 09 2009 *)
CROSSREFS
Cf. A055651.
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Apr 17 2003
EXTENSIONS
More terms from David Wasserman, Oct 04 2004
STATUS
approved
Square array read by descending antidiagonals: T(n,k) = floor(n^k/k^n).
+10
1
1, 0, 2, 0, 1, 3, 0, 0, 1, 4, 0, 1, 1, 1, 5, 0, 1, 1, 0, 0, 6, 0, 1, 1, 1, 0, 0, 7, 0, 2, 3, 1, 0, 0, 0, 8, 0, 4, 6, 3, 1, 0, 0, 0, 9, 0, 6, 12, 6, 2, 0, 0, 0, 0, 10, 0, 10, 27, 16, 4, 1, 0, 0, 0, 0, 11, 0, 16, 59, 39, 11, 2, 0, 0, 0, 0, 0, 12, 0, 28, 133, 104, 33, 6, 1, 0, 0, 0, 0, 0, 13
OFFSET
1,3
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..11325 (first 150 antidiagonals).
EXAMPLE
T(3,2) = floor(3^2/2^3) = floor(9/8) = 1.
MATHEMATICA
Table[Floor[k^(n-k+1)/(n-k+1)^k], {n, 15}, {k, n}] (* Paolo Xausa, May 06 2024 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Henry Bottomley, Jul 02 2001
STATUS
approved

Search completed in 0.014 seconds