login
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
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.
Is this sequence well-defined? The data could not be reproduced based on the name, comments, or existing code. Note that all odd primes can be represented as the difference of two squares so, for example, why is 67 = 34^2-33^2 not in the data. Restricting z>2, also does not reproduce this sequence. - Sean A. Irvine, Jul 11 2025
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 * A386529 A038614 A386324
KEYWORD
easy,nonn,obsc
AUTHOR
Cino Hilliard, Dec 16 2002
STATUS
approved