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.

A243100 Primes of the form x^(y+1)-y^x, for x,y > 0.

Original entry on oeis.org

3, 7, 19, 179, 543607, 129136067, 94143168179, 11920928949924493, 36472996377170722403, 61159026180004467059, 1341068619659378429383, 10301051460877537453973547005699, 710542735760100185871124061615149, 17763568394002504646778106434649157
Offset: 1

Views

Author

M. F. Hasler, Aug 19 2014

Keywords

Comments

See A123206 for primes of the form x^y-y^x with x,y>1. If y=1 is allowed, any prime p is obtained for x=p+1; this motivates the "y+1" in the exponent of the present sequence.
See also A086877 (and A098463) for primes of the form (x+1)^x-x^x.
y=0 would give "Primes of the form x", so y>0 is required. y=1 gives x^2-1 = (x-1)*(x+1) which is only prime for x=2. - Jens Kruse Andersen, Aug 23 2014

Crossrefs

See also A072164.

Programs

  • PARI
    a=[];for(S=1,199,for(x=1,S-1,ispseudoprime(p=x^(1+y=S-x)-y^x)&&a=concat(a,p)));vecsort(a) \\ The list calculated this way is probably not complete up to the last terms. E.g., a 46 digit prime is found for x=3, y=97 after three larger terms for smaller S=x+y.
    
  • PARI
    m=300; a=[]; for(x=1, m+5, for(y=1, m+5, p=x^(y+1)-y^x; if(p<2^m && ispseudoprime(p), a=concat(a, p)))); a=vecsort(a) \\ Compute all terms below 2^m. Jens Kruse Andersen, Aug 23 2014

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

A086877 Primes of the form (k+1)^k - k^k.

Original entry on oeis.org

5, 37, 4651, 1273609
Offset: 1

Views

Author

Cino Hilliard, Aug 21 2003

Keywords

Crossrefs

The values of k are in A098463.
Primes in A055869.
Cf. A085682.

Programs

  • PARI
    f(n) = for(x=1,n,y=(x+1)^x-x^x; if(isprime(y),print1(y, ", ")))

Formula

a(n) = A055869(A098463(n)). - Elmo R. Oliveira, Feb 19 2025
Showing 1-3 of 3 results.