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.

Showing 1-4 of 4 results.

A128355 Numbers k such that A122735(n) = n^k - k^n.

Original entry on oeis.org

0, 5, 4, 0, 14, 7, 20, 11, 10, 273, 14, 13, 38, 89, 68, 0
Offset: 1

Views

Author

Alexander Adamchuk, Mar 05 2007

Keywords

Comments

Currently a(n) is not known for n = {17, 18, 22, 25, 26, 27, 28, ...}.

Crossrefs

Cf. A122735.

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

Views

Author

Alexander Adamchuk, Oct 04 2006

Keywords

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

Examples

			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
		

Crossrefs

Programs

  • 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]; num0&&PrimeQ[#]&]],nn]] (* Harvey P. Dale, Nov 23 2013 *)
  • 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

A078202 a(n) is the smallest prime of the form abs(n^k - k^n), the absolute difference between n^k and k^n, or -1 if no such prime exists.

Original entry on oeis.org

2, 7, 2, 3, 7, 5, 79, 7, 431, 58049, 8375575711, 11, 13055867207, 13, 94233563770233419658037661865757455268745312881861761180195872329157714108064193, -1, 130783, 17, 523927, 19, 2046526777460104549122039297254727662107009
Offset: 1

Views

Author

Amarnath Murthy, Nov 21 2002

Keywords

Comments

If p is a prime then a(p+1) = p, with k = 1.
a(15) = 15^68 - 68^15, a 79-digit (certified) prime. a(16), if it exists, is greater than 16^39000 - 39000^16. a(17)..a(21) = 130783, 17, 523927, 19, 21^32 - 32^21 a(22), if it exists, is greater than 22^4000 - 4000^22. - Ryan Propper, Jun 20 2005
a(16) does not exist because 16^k - k^16 = (2^k + k^4)*(2^k - k^4)*(4^k + k^8) is composite for all k>0 except k = 16 when 16^k - k^16 = 0. - Alexander Adamchuk, Oct 04 2006
From Alexander Adamchuk, Oct 08 2006: (Start)
a(16) = -1. a(64) = -1. a(p+1) = p for prime p (note that corresponding k = 1). Corresponding minimum numbers k such that a(n) = Abs[n^k - k^n] are listed in A123701[n] = {3, 5, 1, 1, 2, 1, 2, 1, 2, 3, 8, 1, 6, 1, 68, -1, 2, 1, 2, 1, 32, 0, 60, 1, 12, 5, 0, 0, 98, 1, 42, 1, 0, 69, 6, 0, 0, 1, 0, 0, 60, 1, 32, 1, 44, 0, 110, 1, 24, 9, 2, 3, 2, 1, 0, 0, 0, 93, 0, 1, 180, 1, 88, -1, ...}, where k = -1 corresponds to a(n) = -1 and k = 0 corresponds to unknown a(n).
Currently a(n) is not known for n = {22, 27, 28, 33, 36, 37, 39, 40, 46, 55, 56, 57, 59, ...}.
a(11) = A122735(8) = 8^11 - 11^8 = 8375575711.
a(23),...,a(26) = {5054406430037885272981046135356839275715337535595096730028585410509132307928805601, 23, 953962166381085484825907807, 1490116119372884249}.
a(29),...,a(32) = {206539819953120274082671951780133190199874283596796371019530391490632157734921141966645648468156156063312771029604269179320472997337565971011273, 29, 433701716540983075324378476772415372611417595782401142359682753, 31}.
a(34),a(35) = {4699430983941716970028771656710732728232409636582667368874494198279899620725264856063216685987945059885543, 1719070799748422589190392551}.
a(38) = 37.
a(41),...,a(45) = {5848323709692443853597758618333177807096734261529545472862754750637561785400251641976844727314401, 41, 52656145834259929956933044695165193898922574867326768896079818367, 43, 84721522804414816904952398305908708011513455440403306207160333176150520399}. (End)

Examples

			a(4) = 4^1 - 1^4 = 3, a(10) = 3^10 - 10^3 = 58049.
		

Crossrefs

Cf. A078201.
Cf. A123701 = Minimum number k such that A078202(n) = abs(n^k - k^n) is prime.
Cf. A122735 = Smallest prime of the form (n^k - k^n) for k > 1.

Programs

  • Mathematica
    Do[k = 1; While[ !PrimeQ[Abs[n^k - k^n]], k++ ]; Print[Abs[n^k - k^n]], {n, 1, 14}] (* Ryan Propper, Jun 20 2005 *)

Extensions

Corrected and extended by Ryan Propper, Jun 20 2005
More terms from Alexander Adamchuk, Oct 08 2006

A123701 Minimum number k > 0 such that abs(n^k - k^n) = A078202(n) is prime, or -1 if such k > 0 does not exist.

Original entry on oeis.org

3, 5, 1, 1, 2, 1, 2, 1, 2, 3, 8, 1, 6, 1, 68, -1, 2, 1, 2, 1, 32
Offset: 1

Views

Author

Alexander Adamchuk, Oct 08 2006

Keywords

Comments

A078202(n) is the smallest prime of the form abs(n^k - k^n), the absolute difference between n^k and k^n, or -1 if no such prime exists. A078202(n) = {2, 7, 2, 3, 7, 5, 79, 7, 431, 58049, 8375575711, 11, 13055867207, 13, 94233563770233419658037661865757455268745312881861761180195872329157714108064193, -1, 130783, 17, ...}. a(n) = -1 for n = {16,64,...} when A078202(n) = -1. a(n) = 1 for n = {3,4,6,8,12,14,18,20,...} = A008864(n) Primes + 1, when A078202(p+1) = p. Currently a(n) is not known for n = {22,28,33,36,37,39,40,46,55,56,57,59,...}. a(23)-a(27) = {60,1,12,5,-1}. a(29)-a(32) = {98,1,42,1}. a(34)-a(35) = {69,6}. a(38) = 1. a(41)-a(45) = {60,1,32,1,44}. a(47)-a(54) = {110,1,24,9,2,3,2,1}. a(58) = 93. a(60)-a(64) = {1,180,1,88,-1}.
Let x >= 2 and y >= 1 and k >= 1 and n == x^(xy). Then either (x,y,k) = (2,1,3) or (x,y,k) = (2,1,1) or abs(n^k - k^n) is composite. If we have (x,y) == (2,1), then n == 4, and we can check that a(4) == 1. Therefore, if n != 4 is a power of a number of the form x^x, then a(n) == -1. - Lucas A. Brown, Mar 25 2024

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = If[EvenQ@n || n < 4, 1, 2]}; While[ ! PrimeQ@Abs[n^k - k^n], k += 2]; k] (* Robert G. Wilson v *)
Showing 1-4 of 4 results.