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 A242459 #38 May 19 2024 02:15:19 %S A242459 1,2,3,4,6,12,20,24,27,29,42,54,72,75,103,128,131,151,153,162,164,181, %T A242459 204,208,209,211,237,265,285,286,326,335,340,356,368,392,409,432,439, %U A242459 441,444,446 %N A242459 Maximal differences of A029707. %F A242459 a(n) = primepi(next(A054691(n-1))) - primepi(A054691(n-1)) + 1 for n >= 2, where primepi = A000720 and next(k) is the least lesser of twin primes that is larger than k. - _Amiram Eldar_, May 19 2024 %t A242459 nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[ NextPrime@ q - q > 2, q = NextPrime@ q]; q]; p = 2; q = 3; px = 1; qx = 2; mxd = 0; tpx = 0; lst = {}; While[p < %t A242459 5090000001, d = qx - px; If[ d > mxd, mxd = d; AppendTo[ lst, d]; Print@ d]; p = q; px = qx; q = nextLesserTwinPrime@ q; qx = PrimePi@ q; tpx++]; lst (* _Robert G. Wilson v_, May 21 2014 *) %o A242459 (Sage) %o A242459 def A242459_list(n) : %o A242459 a = [ 1 ] %o A242459 st = 3 %o A242459 for i in (4..n) : %o A242459 if (nth_prime(i+1)-nth_prime(i) == 2) : %o A242459 if i-st > a[len(a)-1] : %o A242459 a.append(i-st) %o A242459 st = i %o A242459 return(a) %o A242459 A242459_list(10^(5)) %Y A242459 Cf. A000720, A001359, A027833, A029707, A054691. %K A242459 nonn,more %O A242459 1,2 %A A242459 _Jani Melik_, May 15 2014 %E A242459 a(20)-a(28) from _Robert G. Wilson v_, May 21 2014 %E A242459 a(29)-a(42) from _Amiram Eldar_, May 19 2024