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.
%I A258039 #8 Nov 14 2024 08:20:03 %S A258039 2,3,5,11,17,23,31,41,47,53,61,71,79,89,101,103,109,127,137,149,157, %T A258039 167,173,181,193,199,227,233,241,257,269,277,283,307,313,331,347,353, %U A258039 367,379,389,401,419,431,439,449,461,467,487,499,509,541,557,569,577 %N A258039 Numbers prime(k) such that D(prime(k), k-1) > 0, where D( * , k-1) = (k-1)-st difference. %C A258039 Partition of the positive integers: A258036, A258037; %C A258039 Corresponding partition of the primes: A258038, A258039. %H A258039 Clark Kimberling, <a href="/A258039/b258039.txt">Table of n, a(n) for n = 1..1000</a> %F A258039 D(prime(k), k-1) = Sum_{i=0..k-1} (-1)^i*prime(k-i)*binomial(k-1,i). [corrected by _Jason Yuen_, Nov 13 2024] %F A258039 a(n) = prime(A258037(n)). - _Jason Yuen_, Nov 13 2024 %e A258039 D(prime(2), 1) = 3 - 2 > 0, so a(1) = prime(1) = 2; %e A258039 D(prime(3), 2) = 5 - 2*3 + 2 > 0, so a(2) = prime(2) = 3; %e A258039 D(prime(4), 3) = 7 - 3*5 + 3*3 - 2 < 0. %t A258039 u = Table[Prime[Range[k]], {k, 1, 1000}]; %t A258039 v = Flatten[Table[Sign[Differences[u[[k]], k - 1]], {k, 1, 100}]]; %t A258039 w1 = Flatten[Position[v, -1]] (* A258036 *) %t A258039 w2 = Flatten[Position[v, 1]] (* A258037 *) %t A258039 p1 = Prime[w1] (* A258038 *) %t A258039 p2 = Prime[w2] (* A258039 *) %Y A258039 Cf. A258036, A258037, A258038. %K A258039 nonn,easy %O A258039 1,1 %A A258039 _Clark Kimberling_, Jun 05 2015