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-3 of 3 results.

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

A285886 Primes of the form (1 + x)^y + (-x)^y where x is a divisor of y.

Original entry on oeis.org

5, 7, 13, 17, 31, 37, 97, 127, 257, 881, 4651, 8191, 65537, 131071, 524287, 1273609, 2147483647, 2305843009213693951, 618970019642690137449562111, 3512911982806776822251393039617, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2017

Keywords

Comments

If x = y then: 13, 37, 881, 4651, 1273609, ...
Primes of the form (1 + x)^y - x^y where y is divisor of x: 3, 5, 7, 31, 37, 127, 4651, 8191, 131071, 524287, ..., which is A285887.

Examples

			5 is in this sequence because (1 + 1)^2 + (-1)^2 = 5 is prime where 1 is a divisor of 2.
A complete list of (x, y, p) corresponding to the shown data is
  (1,2,5), (1,3,7), (2,2,13), (1,4,17), (1,5,31), (3,3,37), (2,4,97),(1,7,127), (1,8,257), (4,4,881), (5,5,4651), (1,13,8191), (1,16,65537),
  (1,17,131071), (1,19,524287), (7,7,1273609), (1,31,2147483647),
  (1,61,2305843009213693951), (1,89,618970019642690137449562111),
  (8,32,3512911982806776822251393039617),
  (1,107,162259276829213363391578010288127),
  (1,127,170141183460469231731687303715884105727).
  Further terms correspond to (x,y) = {(1,521), (1,607), (167,167), (1,1279), (1,2203), (1,2281), (1,3217), ...}. - _Hugo Pfoertner_, Jan 12 2020
		

Crossrefs

Cf. A000668 (Mersenne primes), A019434 (Fermat primes), A243100, A285887, A285888.

Programs

  • Mathematica
    Union@ Flatten@ Table[Select[Map[(1 + #)^n + (-#)^n &, Divisors@ n], PrimeQ], {n, 150}] (* Michael De Vlieger, Apr 29 2017 *)

Extensions

Edited by N. J. A. Sloane, Jan 11 2020

A285888 Numbers n such that (1 + n)^n + (-n)^n is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 7, 167
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2017

Keywords

Comments

The next term, if it exists, is > 10000. - Hugo Pfoertner, Jan 06 2020
The associated primes are: 13, 37, 881, 4651, 1273609, ...
From Robert Israel, Apr 28 2017: (Start)
All terms other than 0 are primes or powers of 2.
Heuristically, this sequence might be expected to be finite. (End)

Examples

			4 is in this sequence because (1 + 4)^4 + (-4)^4 = 881 is prime.
		

Crossrefs

Supersequence of A098463.

Programs

  • Magma
    [n: n in [0..170]| IsPrime((n+1)^n + (-n)^n)];
    
  • Maple
    N:= 1000: # to get all terms <= N
    cands:= select(isprime, {seq(i,i=3..N,2)}) union {0, seq(2^k, k=1..ilog2(N))}:
    select(n -> isprime((1+n)^n + (-n)^n), cands); # Robert Israel, Apr 28 2017
  • PARI
    is(n)=ispseudoprime((n+1)^n+(-n)^n) \\ Charles R Greathouse IV, Apr 28 2017
Showing 1-3 of 3 results.