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.

A364787 a(n) is the stabilization index of the prime ladder [P(n,k) : k >= 0].

This page as a plain text file.
%I A364787 #11 Aug 30 2023 11:04:23
%S A364787 0,1,3,2,7,6,17,17,19,18,13,13,11,11,47,46,39,39,59,59,68,68,71,71,61,
%T A364787 61,60,59,56,55,49,49,47,47,334,333,508,508,488,488,466,466,423,423,
%U A364787 512,512,488,488,468,468,450,450,696,696,652,652,639,638,613,613
%N A364787 a(n) is the stabilization index of the prime ladder [P(n,k) : k >= 0].
%C A364787 Given n >= 0, we consider the following increasing sequence of prime numbers: P(n,0) = 2, and for k > 0, P(n,k) is the largest prime number smaller than or equal to P(n,k-1)+n. Since the sequence of all prime numbers has arbitrarily long gaps, there exists an index m >= 0 such that P(n,m) = P(n,m+1). We define a(n) as the smallest of such indices.
%C A364787 Note that a(n) displays big jumps at values of n corresponding to maximal prime gaps (A005250).
%C A364787 In general, for k >= 0, a(2k+1) = a(2k), but there are exceptions: for n = 0, 2, 4, 8, 14, 26, 28, 34, 56, 94, 154, and 484, |a(n+1) - a(n)| = 1. We don't know if there are more of these blips.
%H A364787 Eduard Roure Perdices, <a href="/A364787/b364787.txt">Table of n, a(n) for n = 0..807</a>
%e A364787 a(4) = 7 because P(4,0) = 2, P(4,1) = 5, P(4,2) = 7, P(4,3) = 11, P(4,4) = 13, P(4,5) = 17, P(4,6) = 19, and for k >= 7, P(4,k) = 23.
%t A364787 SequenceA[n_] := Module[{pn0 = 2, pnk, an = 0},
%t A364787    While[True, pnk = NextPrime[pn0 + n + 1, -1];
%t A364787     If[pn0 == pnk, Break[], pn0 = pnk; an++]];
%t A364787    Return[an];];
%Y A364787 Cf. A000040, A001223, A002386, A005250.
%K A364787 nonn
%O A364787 0,3
%A A364787 _Eduard Roure Perdices_, Aug 07 2023