A007925
a(n) = n^(n+1) - (n+1)^n.
Original entry on oeis.org
-1, -1, -1, 17, 399, 7849, 162287, 3667649, 91171007, 2486784401, 74062575399, 2395420006033, 83695120256591, 3143661612445145, 126375169532421599, 5415486851106043649, 246486713303685957375, 11877172892329028459041, 604107995057426434824791
Offset: 0
Dennis S. Kluk (mathemagician(AT)ameritech.net)
a(2) = 1^2 - 2^1 = -1,
a(4) = 3^4 - 4^3 = 17.
- G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
-
A007925:=n->n^(n+1)-(n+1)^n: seq(A007925(n), n=0..25); # Wesley Ivan Hurt, Jan 10 2017
-
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 *)
-
A007925[n]:=n^(n+1)-(n+1)^n$ makelist(A007925[n],n,0,30); /* Martin Ettl, Oct 29 2012 */
-
a(n)=n^(n+1)-(n+1)^n \\ Charles R Greathouse IV, Feb 06 2017
A123206
Primes of the form x^y - y^x, for x,y > 1.
Original entry on oeis.org
7, 17, 79, 431, 58049, 130783, 162287, 523927, 2486784401, 6102977801, 8375575711, 13055867207, 83695120256591, 375700268413577, 2251799813682647, 9007199254738183, 79792265017612001, 1490116119372884249
Offset: 1
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
Cf.
A072180,
A109387,
A117705,
A117706,
A128447,
A128449,
A128450,
A128451,
A122003,
A128453,
A128454.
-
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
-
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]; num0&&PrimeQ[#]&]],nn]] (* Harvey P. Dale, Nov 23 2013 *)
-
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
A337670
Numbers that can be expressed as both Sum x^y and Sum y^x where the x^y are not equal to y^x for any (x,y) pair and all (x,y) pairs are distinct.
Original entry on oeis.org
432, 592, 1017, 1040, 1150, 1358, 1388, 1418, 1422, 1464, 1554, 1612, 1632, 1713, 1763, 1873, 1889, 1966, 1968, 1973, 1990, 2091, 2114, 2190, 2291, 2320, 2364, 2451, 2589, 2591, 2612, 2689, 2697, 2719, 2753, 2775, 2803, 2813, 2883, 3087, 3127, 3141, 3146
Offset: 1
17 = 2^3 + 3^2 = 3^2 + 2^3 is not in the sequence because {2,3} = {3,2} are not distinct.
25 = 3^3 + 2^4 = 3^3 + 4^2 is not in the sequence because 3^3 = 3^3 and 2^4 = 4^2 are commutative.
The smallest term of the sequence is:
a(1) = 432 = 3^2 + 5^2 + 2^6 + 3^4 + 5^3 + 2^7
= 2^3 + 2^5 + 6^2 + 4^3 + 3^5 + 7^2.
The smallest term that has more than one representation is:
a(11) = 1554 = 3^2 + 7^2 + 6^3 + 2^8 + 4^5
= 2^3 + 2^7 + 3^6 + 8^2 + 5^4,
a(11) = 1554 = 3^2 + 5^2 + 2^6 + 10^2 + 2^7 + 3^5 + 2^8 + 3^6
= 2^3 + 2^5 + 6^2 + 2^10 + 7^2 + 5^3 + 8^2 + 6^3.
Smallest terms with k = 5, 6, 7, 8, 9, 10 summands are:
a(9) = 1422 = 5^2 + 7^2 + 9^2 + 3^5 + 4^5
= 2^5 + 2^7 + 2^9 + 5^3 + 5^4,
a(1) = 432 = 3^2 + 5^2 + 2^6 + 3^4 + 5^3 + 2^7
= 2^3 + 2^5 + 6^2 + 4^3 + 3^5 + 7^2,
a(2) = 592 = 3^2 + 5^2 + 7^2 + 4^3 + 2^6 + 5^3 + 2^8
= 2^3 + 2^5 + 2^7 + 3^4 + 6^2 + 3^5 + 8^2,
a(11) = 1554 = 3^2 + 5^2 + 2^6 + 10^2 + 2^7 + 3^5 + 2^8 + 3^6
= 2^3 + 2^5 + 6^2 + 2^10 + 7^2 + 5^3 + 8^2 + 6^3,
a(14) = 1713 = 3^2 + 2^5 + 6^2 + 8^2 + 4^3 + 2^7 + 3^5 + 2^9 + 5^4
= 2^3 + 5^2 + 2^6 + 2^8 + 3^4 + 7^2 + 5^3 + 9^2 + 4^5,
a(28) = 2451 = 3^2 + 5^2 + 6^2 + 8^2 + 3^4 + 2^7 + 6^3 + 3^5 + 5^4 + 2^10
= 2^3 + 2^5 + 2^6 + 2^8 + 4^3 + 7^2 + 3^6 + 5^3 + 4^5 + 10^2.
Cf.
A337671 (subsequence for k <= 5).
Cf.
A005188 (perfect digital invariants).
Cf. Nonnegative numbers of the form (r^n - n^r), for n,r > 1:
A045575.
Cf. Numbers of the form (r^n - n^r):
A024012 (r = 2),
A024026 (r = 3),
A024040 (r = 4),
A024054 (r = 5),
A024068 (r = 6),
A024082 (r = 7),
A024096 (r = 8),
A024110 (r = 9),
A024124 (r = 10),
A024138 (r = 11),
A024152 (r = 12).
A242113
a(n) = number of primes of the form k^n - m^k where k > m > 0.
Original entry on oeis.org
0, 1, 2, 6, 7, 2, 14, 7, 11, 10, 33, 10, 42, 35, 47, 39, 122, 22, 248, 113, 247, 236, 751, 75, 1268, 812, 1422, 1531, 4543, 87, 8669, 5750, 8884, 10983, 29084, 2274, 58841, 41242, 58030, 74646, 216647, 11656, 419147, 313237, 364925, 617742, 1576642, 75542, 3071839, 2299620
Offset: 1
a(2) = 1 because 2^2 - 1^2 = 3 is prime;
a(3) = 2 because 2^3 - 1^2 = 7 is prime and 3^3 - 2^3 = 19 is prime, but 2^3 - 2^3 < 0, 5^3 - 2^5 = 93 is not prime, 5^3 - 2^7 = 215 is not prime, 9^3 - 2^9 = 217 is not prime, 11^3 - 2^11 < 0.
More generally, primes of the form k^r - m^k where k > m > 0:
r = 2: 3;
r = 3: 7, 19;
r = 4: 7, 17, 73, 593, 2273, 20369;
r = 5: 7, 23, 31, 179, 58537, 1951811, 1986949;
r = 6: 4818617, 24006497;
r = 7: 7, 47, 79, 103, 127, 1137, 2179, 77101, 162287, 543607, 1706527, 9940951, 6069961193, 25365130463;
r = 8: 31, 6553, 141793, 49046209, 815722529, 16983038753, 499709542049;
r = 9: 71, 151, 223, 431, 463, 487, 503, 4521799, 133227103, 10604491181, 1175888158183;
r = 10: 4177, 37097, 58049, 58537, 1803001, 2486784401, 3486783889, 41426502825041, 819626139497153, 52458394747474721.
-
f[r_] := Length@ Rest@ Union@ Flatten@ Table[ If[ PrimeQ[k^r - m^k], k^r - m^k, 0], {k, 2, 10000000}, {m, Floor[k^(r/k)]}]; Do[ Print[ f[r]], {r, 2, 50}] (* Robert G. Wilson v, Aug 25 2014 *)
Showing 1-4 of 4 results.
Comments