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.

A068145 Primes of the form a^a + b^b where a and b are positive integers.

Original entry on oeis.org

2, 5, 31, 257, 283, 823547, 823799, 10000823543, 11112006825558043, 437893890380859631, 39346408075296538398967, 20880467999847912043271133358823, 88817841970012523233890533447265881
Offset: 1

Views

Author

Amarnath Murthy, Feb 23 2002

Keywords

Comments

The sum of the reciprocals of this sequence converges to 0.73968511225249255023367393935203659031815678811682494308673702866... The PARI program below for powerpp(60) and powerpp(70) give this result for 100 digits. Is this number irrational? Transcendental? - Cino Hilliard, Dec 14 2002
Note that 3 is also a prime of the form a^a + b^b where a = 2 and b = -1. But this sequence focuses on the positive values of a and b. - Altug Alkan, Jan 08 2016

Examples

			257 = 4^4 + 1^1 is a prime. 823799 = 4^4 + 7^7 is a prime.
		

Programs

  • Maple
    k := 1; for i from 2 to 100 do for j from 1 to i-1 do a := i^i+j^j; if(isprime(a)=true) then feld[k] := a; k := k+1; end if; end do; end do; sort([seq(feld[p],p=1..k-1)]);
  • Mathematica
    nn=100; Select[ Union[ Flatten[ Table[a^a + b^b, {a, nn}, {b, a} ]]], #Harvey P. Dale, Apr 09 2015 *)
  • PARI
    powerpp(n) = { ct=0; sr=0; a=vector(n*n*n); for(x=1,n, for(y=x,n, v = x^x+y^y; if(isprime(v),ct+=1; a[ct] = v; \ print(x" "y" "z" "v" "ct); ); ); ); for(j=1,ct, for(k=j+1,ct, if(a[j] > a[k],tmp=a[k]; a[k]=a[j]; a[j]=tmp); ); ); for(j=1,ct, if(a[j]<>a[j+1],sr+=1.0/a[j]; print1(a[j]" ")); ); print(); print(sr); }
    
  • PARI
    v=[2];for(a=2,380,forstep(b=a%2+1,a-1,2,if(ispseudoprime(t=a^a+b^b),v=concat(v,t);print(a"^"a" + "b"^"b))));v \\ Charles R Greathouse IV, Feb 14 2011

Extensions

Edited and extended by Robert G. Wilson v and Sascha Kurz, Mar 01 2002
Name clarified by Altug Alkan, Jan 08 2016