A251623
Primes p with property that the sum of the 4th powers of the successive gaps between primes <= p is a prime number.
Original entry on oeis.org
5, 19, 29, 41, 61, 67, 83, 89, 103, 113, 167, 179, 229, 263, 281, 283, 307, 317, 359, 461, 467, 509, 563, 571, 613, 739, 743, 761, 1019, 1031, 1051, 1093, 1229, 1291, 1297, 1319, 1409, 1447, 1609, 1621, 1667, 1747, 1801, 1877, 1979, 2113, 2137, 2161
Offset: 1
a(1)=5; primes less than or equal to 5: [2, 3, 5]; 4th power of prime gaps: [1, 16]; sum of 4th power of prime gaps: 17.
a(2)=19; primes less than or equal to 13: [2, 3, 5, 7, 11, 13, 17, 19]; 4th powers of prime gaps (see A140299): [1, 16, 16, 256, 16, 256, 16]; sum of these: 577.
-
p = 2; q = 3; s = 0; lst = {}; While[p < 2500, s = s + (q - p)^4; If[ PrimeQ@ s, AppendTo[lst, q]]; p = q; q = NextPrime@ q]; lst (* Robert G. Wilson v, Dec 19 2014 *)
-
p = 2; q = 3; s = 1; for (i = 1, 100, p = q; q = nextprime (q + 1); if (isprime (s = s + (q - p)^4), print1 (q ", "))) \\ Zak Seidov, Jan 19 2015
-
import sympy
p=2
s=0
while 10000>p>0:
np=sympy.nextprime(p)
if sympy.isprime(s):
print(p)
d=np-p
s+=(d**4)
p=np
A252655
Smallest prime p with property that the sum of the n-th power of the successive gaps between primes <= p is also a prime number.
Original entry on oeis.org
5, 5, 7, 5, 43, 13, 7, 5, 241, 13, 43, 41, 19, 41, 7, 5, 13, 83, 43, 229, 811, 41, 31, 167, 811, 127, 367, 419, 79, 43, 43, 83, 673, 19, 109, 83, 13, 331, 523, 409, 199
Offset: 1
n=1: p=5; primes less than or equal to 5: [2, 3, 5]; prime gaps: [1, 2]; sum of prime gaps: 3.
n=2: p=5; primes less than or equal to 5: [2, 3, 5]; squares of prime gaps: [1, 4]; sum of squares of prime gaps: 5.
n=3: p=7; primes less than or equal to 7: [2, 3, 5, 7]; cubes of prime gaps: [1, 8, 8]; sum of cubes of prime gaps: 17.
n=4: p=5; primes less than or equal to 5: [2, 3, 5]; 4th power of prime gaps: [1, 16]; sum of 4th power of prime gaps: 17.
-
f[n_] := Block[{p = 2, s = 0}, While[ !PrimeQ@ s, q = NextPrime@ p; s = s + (q - p)^n; p = q]; p]; Array[f, 60] (* Robert G. Wilson v, Jan 11 2015 *)
-
import sympy
c=1
while c>0:
p=2
d=0
s=0
while p>0:
s=s+(d**c)
sp=sympy.isprime(s)
if sp ==True:
print(c,p)
p=-1
c=c+1
else:
np=sympy.nextprime(p)
d=np-p
p=np
A252768
Primes p with property that the sum of the k-th powers of the successive gaps between primes <= p are prime numbers for k = 1 to n.
Original entry on oeis.org
5, 5, 13, 14593, 372313, 2315773, 541613713
Offset: 1
n=3, p=13, List of primes [2, 3, 5, 7, 11, 13] and respective prime gaps are [1, 2, 2, 4, 2].
k=1: Sum of prime gaps = 11.
k=2: Sum of squares of prime gaps = 29.
k=3: Sum of cubes of prime gaps = 89.
-
a(n) = {vp = primes(200000); vdp = vector(#vp-1, k, vp[k+1] - vp[k]); vpp = vector(n, k, 1); k = 2; while (sum(m=1, n, isprime(vpp[m])) != n, for (j=1, n, vpp[j] += vdp[k]^j;); k++;); vp[k];} \\ Michel Marcus, Jan 23 2015
Showing 1-3 of 3 results.
Comments