cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A198696 Positions of local maxima in differences of primes, A001223.

Original entry on oeis.org

4, 6, 9, 11, 18, 21, 24, 27, 30, 32, 34, 42, 44, 51, 53, 58, 62, 66, 68, 72, 77, 80, 82, 84, 87, 91, 94, 97, 99, 101, 106, 114, 121, 125, 127, 132, 135, 137, 139, 141, 143, 146, 150, 154, 157, 162, 166, 168, 170, 172, 175, 177, 180, 186, 189, 191, 193, 197
Offset: 1

Views

Author

Zak Seidov, Oct 29 2011

Keywords

Comments

Or, numbers n such that A001223(n-1) < A001223(n) > A001223(n+1).
Corresponding values of local maxima (4, 4, 6, 6, 6, 6, 8,...) are in A198697.

Crossrefs

Cf. A196175 local minima in A001223 (first differences of primes), A198697.

Programs

  • 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][[1]] (* T. D. Noe, Dec 27 2011 *)

A198697 Values of local maxima in differences of primes, A001223.

Original entry on oeis.org

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
Offset: 1

Views

Author

Zak Seidov, Oct 29 2011

Keywords

Crossrefs

Cf. A198696 (positions of local maxima in A001223).
Cf. A196175 (positions of local minima in A001223).
Cf. A001223 (first differences of primes).

Programs

  • 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]):
    DP[J]; # Robert Israel, Mar 07 2024
  • 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 *)

A286711 a(n) is the position of the first occurrence of 2n as a local minimum in the prime gaps (A001223).

Original entry on oeis.org

5, 22, 67, 126, 138, 1253, 1586, 1356, 3524, 2129, 10464, 14174, 19633, 23354, 44754, 52872, 194426, 122046, 209609, 249329, 256005, 493543, 335001, 116305, 895479, 1698315, 1324483, 2783617, 679305, 1015023, 2217824, 3625328, 1595431, 6660573, 13611829, 4061952, 14641489
Offset: 1

Views

Author

Zak Seidov, May 13 2017

Keywords

Examples

			a(1)=5 because A001223(4)=4, A001223(5)=2, A001223(6)=4,
a(2)=22 because A001223(21)=6, A001223(22)=4, A001223(23)=6,
a(50)=112849562 because A001223(112849561)=108, A001223(112849562)=100, A001223(112849563)=120,
		

Crossrefs

Cf. A001223 (differences between consecutive primes), A196175 (positions of local minima in A001223).

Programs

  • Mathematica
    nv=tg=20; T = 0 Range[nv]; n=0; p=q=3; b=c=2; While[tg>0, p = NextPrime[p]; n++; {a, b, c, q} = {b, c, p-q, p}; If[b <= 2 nv && a>bGiovanni Resta, May 13 2017 *)
Showing 1-3 of 3 results.