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!)
A248702 Smallest prime such that the n preceding prime gaps are monotonically decreasing and the n following prime gaps are monotonically increasing. 4
2, 3, 19, 43, 2687, 179819, 1107791 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(7) >= 8960453, if it exists. - R. J. Mathar, Dec 04 2014
LINKS
EXAMPLE
a(n=3) = 43 because it is in the middle of the consecutive primes [31 , 37 , 41 , 43 , 47 , 53 , 59] which define the sequence of 2n=6 prime gaps [6, 4, 2, 4, 6, 6], where 6>=4>=2 is monotonically decreasing and 4<=6<=6 is monotonically increasing.
MAPLE
A248702 := proc(n)
local glist, p, wrks, s ;
if n = 0 then
return ;
else
s := n+1 ;
p := ithprime(s) ;
glist := [seq(ithprime(i+1)-ithprime(i), i=1..2*n)] ;
while true do
wrks := true;
for i from 1 to n-1 do
if glist[i] < glist[i+1] then
wrks := false;
break;
end if;
end do:
for i from n+1 to 2*n-1 do
if glist[i] > glist[i+1] then
wrks := false;
break;
end if;
end do:
if wrks then
return p;
end if;
p := nextprime(p) ;
s := s+1 ;
glist := subsop(1=NULL, glist) ;
glist := [op(glist), ithprime(s+n)-ithprime(s+n-1)] ;
end do:
end if;
end proc: # R. J. Mathar, Dec 04 2014
CROSSREFS
Sequence in context: A051079 A051089 A289860 * A171149 A157042 A128968
KEYWORD
nonn,more
AUTHOR
Abhiram R Devesh, Oct 12 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)