login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078668 Primes that are the difference between two powers: y^z - x^z = prime. 0
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 127, 211, 271, 331, 397, 547, 631, 919, 1657, 1801, 1951, 2269, 2437, 4651, 8191, 14197, 61051, 131071, 371281, 524287, 543607, 723901, 1273609, 1803001, 2685817, 2861461, 5217031 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This sequence is much faster to compute than y^z+x^z since the occurrence of a prime for y^z - x^z only takes place when z = 1 or y-x = 1. This is true because y-x or y+x divides y^z - x^z. comment out the print(x" "y" "z" "v" "ct); in the script to avoid listing the detail to the screen. Sum of the reciprocals of Seq(20,130) converges to 1.6359026039776143431548856889889230600448729878668090784647536941979 31129745142466816093140975967179... to 100 places.

LINKS

Table of n, a(n) for n=1..45.

FORMULA

Seq(n, m) = y^z - x^z = p. x=1..n, y=x..n, p=1..m. Include if p is prime.

EXAMPLE

919 = 18^3 - 17^3. 919 is prime.

PROG

(PARI) powerp(n, p) = { ct=0; sr=0; a=vector(n*n*p); for(x=1, n, for(y=x, n, for(z = 1, p, if(y-x == 1 || z == 1, v = y^z - x^z; 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); }

CROSSREFS

Sequence in context: A118850 A322443 A219697 * A038614 A171047 A050246

Adjacent sequences:  A078665 A078666 A078667 * A078669 A078670 A078671

KEYWORD

easy,nonn

AUTHOR

Cino Hilliard, Dec 16 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 19:57 EDT 2020. Contains 337273 sequences. (Running on oeis4.)