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.

A070866 Smallest prime such that the difference of successive terms is nondecreasing.

This page as a plain text file.
%I A070866 #19 Dec 23 2019 10:29:40
%S A070866 2,3,5,7,11,17,23,29,37,47,59,71,83,97,113,131,149,167,191,223,257,
%T A070866 293,331,373,419,467,521,577,641,709,787,877,967,1061,1163,1277,1399,
%U A070866 1523,1657,1801,1949,2099,2251,2411,2579,2749,2927,3109,3299,3491,3691,3907
%N A070866 Smallest prime such that the difference of successive terms is nondecreasing.
%H A070866 T. D. Noe, <a href="/A070866/b070866.txt">Table of n, a(n) for n = 1..10000</a>
%F A070866 a(1)=2, a(2)=3, a(n) = A007918(2*a(n-1) - a(n-2)). - _Reinhard Zumkeller_, Jul 08 2004
%t A070866 d = 2; p = 2; t = {2, 3}; Do[p = NextPrime[p + d - 1]; d = p - t[[-1]]; AppendTo[t, p], {98}]; t (* _T. D. Noe_, Nov 21 2011 *)
%o A070866 (PARI) s=1; t=1; for(n=1,100,s=s+t; while(isprime(s+t)==0,t++); print1(s+t,","))
%o A070866 (Julia)
%o A070866 using Primes
%o A070866 function A070866(bound)
%o A070866     a, b = 2, 3
%o A070866     P = [a, b]
%o A070866     while true
%o A070866         p = nextprime(b + (b - a))
%o A070866         p > bound && break
%o A070866         push!(P, p)
%o A070866         a, b = b, p
%o A070866     end
%o A070866 P end
%o A070866 A070866(100000) |> println # _Peter Luschny_, Dec 23 2019
%Y A070866 Cf. A070865.
%K A070866 nonn
%O A070866 1,1
%A A070866 _Amarnath Murthy_, May 16 2002
%E A070866 More terms from _Benoit Cloitre_, May 20 2002