|
|
A198697
|
|
Values of local maxima in differences of primes, A001223.
|
|
2
|
|
|
4, 4, 6, 6, 6, 6, 8, 4, 14, 6, 10, 10, 4, 6, 10, 6, 14, 14, 10, 8, 8, 10, 10, 6, 8, 12, 8, 12, 18, 10, 10, 12, 12, 10, 10, 8, 8, 14, 12, 10, 4, 14, 14, 20, 10, 14, 8, 12, 6, 10, 10, 10, 18, 8, 22, 10, 10, 12, 12, 18, 6, 6, 12, 34, 18, 14, 8, 12, 4, 12, 8, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MAPLE
|
P:= select(isprime, [2, seq(i, i=3..1000, 2)]):
DP:= P[2..-1] - P[1..-2]:
J:= select(t -> DP[t] > DP[t-1] and DP[t] > DP[t+1], [$2..nops(DP)-1]):
|
|
MATHEMATICA
|
nn = 1001; t = Differences[Prime[Range[nn]]]; t2 = {}; Do[If[t[[n - 1]] < t[[n]] && t[[n]] > t[[n + 1]], AppendTo[t2, {n, t[[n]]}]], {n, 2, nn - 2}]; Transpose[t2][[2]] (* T. D. Noe, Dec 27 2011 *)
Select[Partition[Differences[Prime[Range[400]]], 3, 1], #[[1]]<#[[2]]>#[[3]]&][[;; , 2]] (* Harvey P. Dale, Mar 07 2023 *)
|
|
CROSSREFS
|
Cf. A001223 (first differences of primes).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|