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.

A366093 Indices of records in A366092.

This page as a plain text file.
%I A366093 #13 Oct 03 2023 17:42:06
%S A366093 0,11,22,27,58,61,110,126,161,545,566,592,747,775,2286,5343,5360,5741,
%T A366093 18245,78272,93999,140690,146338,227734,251721,274297,372294,447238,
%U A366093 586777,808500,7185887,10479806,37485090,85742340,91332097,111764212,117522098,556747657,589122990
%N A366093 Indices of records in A366092.
%t A366093 pDist[n_]:=If[PrimeQ[n],0,Min[NextPrime[n]-n,n-NextPrime[n,-1]]];
%t A366093 A366093list[upto_]:=Module[{r=-1,a={},d=Map[pDist,Prepend[Accumulate[Prime[Range[upto]]],0]]},Do[If[d[[i]]>r,r=d[[i]];AppendTo[a,i-1]],{i,upto}];a];
%t A366093 A366093list[10000]
%o A366093 (Python)
%o A366093 from itertools import count, islice
%o A366093 from sympy import prevprime, nextprime
%o A366093 def A366093_gen(): # generator of terms
%o A366093     c, s, p = 2, 0, 1
%o A366093     yield 0
%o A366093     for i in count(1):
%o A366093         if (m:=min((s:=s+(p:=nextprime(p)))-prevprime(s+1),nextprime(s)-s))>c:
%o A366093             yield i
%o A366093             c = m
%o A366093 A366093_list = list(islice(A366093_gen(),20)) # _Chai Wah Wu_, Oct 03 2023
%Y A366093 Cf. A366092.
%K A366093 nonn,hard
%O A366093 1,2
%A A366093 _Paolo Xausa_, Sep 29 2023
%E A366093 a(31)-a(39) from _Michael S. Branicky_, Oct 03 2023