login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

First appearance of p, by power, beginning with 5: 1, 3, ??, 6, ??, 13, ??, 86, 23, ??, 12, 5, ... . - Robert G. Wilson v, Jan 11 2015

LINKS

Abhiram R Devesh and Robert G. Wilson v, Table of n, a(n) for n = 1..1000 First 100 terms from Abhiram R Devesh.

EXAMPLE

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.

MATHEMATICA

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 *)

PROG

(Python)

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

CROSSREFS

Cf. A006512, A247177, A247178, A251623.

Sequence in context: A195380 A139261 A247649 * A021646 A231589 A133888

Adjacent sequences:  A252652 A252653 A252654 * A252656 A252657 A252658

KEYWORD

nonn

AUTHOR

Abhiram R Devesh, Dec 19 2014

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 21:48 EDT 2018. Contains 315262 sequences. (Running on oeis4.)