login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316791 a(n) is the least prime p such that the second forward difference of three consecutive primes p, q and r is n = (p - 2q + r)/2. 1
3, 5, 29, 503, 137, 109, 1063, 1931, 521, 7951, 1949, 1667, 5743, 2969, 1321, 15817, 9547, 28349, 45433, 20807, 15679, 113837, 43793, 19603, 40283, 25469, 40637, 156151, 79697, 34057, 282487, 134507, 552401, 770663, 31393, 188021, 480203, 461707, 281429, 1078241, 265619, 637937 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Inspired by A295973.
Except for the first three primes {2, 3, 5}, all sfds are even.
The only other sfd which is not covered by this sequence is when the primes are {2, 3, 5} which results in an sfd of 1.
Except for an sfd of 0 or 1, all values of sfd occur infinitely often.
As an example, sfd=2 for p = 5, 11, 17, 19, 41, 43, 79, 83, 101, 107, 127, 163, ..., .
LINKS
Eric Weisstein's World of Mathematics, Forward Difference.
EXAMPLE
a(0) = 3 since the three consecutive primes {3, 5, 7} have an sfd of 0;
a(1) = 5 since the three consecutive primes {5, 7, 11} have an sfd of 2;
a(2) = 29 since the three consecutive primes {29, 31, 37} have an sfd of 4;
a(3) = 503 since the three consecutive primes {503, 509, 521} have an sfd of 6;
a(4) = 137 since the three consecutive primes {137, 139, 149} have an sfd of 8; etc.
MATHEMATICA
p = 2; q = 3; r = 5; t[_] := 0; While[p < 1100000, d = p - 2q + r; If[ t[d] == 0, t[d] = p]; p = q; q = r; r = NextPrime@ r]; Array[ t[2#] &, 42, 0]
PROG
(PARI) a(n) = my(p=2, q=3); while ((p - 2*q + nextprime(q+1))/2 != n, p=q; q=nextprime(q+1)); p; \\ Michel Marcus, Mar 08 2023
CROSSREFS
Sequence in context: A352295 A283266 A060255 * A154552 A261463 A352913
KEYWORD
nonn
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)