A229033 Record values in A229030.
5, 7, 251, 683, 2017, 18679, 608131, 937127, 21954731, 95270633, 165066283, 465512447, 804346451
Offset: 1
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.
The following table, based on a very much larger table in the web page of Tomás Oliveira e Silva (see link) shows, for each gap g, P(g) = the smallest prime such that P(g)+g is the smallest prime number larger than P(g); * marks a record-holder: g is a record-holder if P(g') > P(g) for all (even) g' > g, i.e., if all prime gaps are smaller than g for all primes smaller than P(g); P(g) is a record-holder if P(g') < P(g) for all (even) g' < g. This table gives rise to many sequences: P(g) is A000230, the present sequence; P(g)* is A133430; the positions of the *'s in the P(g) column give A100180, A133430; g* is A005250; P(g*) is A002386; etc. ----- g P(g) ----- 1* 2* 2* 3* 4* 7* 6* 23* 8* 89* 10 139* 12 199* 14* 113 16 1831* 18* 523 20* 887 22* 1129 24 1669 26 2477* 28 2971* 30 4297* 32 5591* 34* 1327 36* 9551* ........ The first time a gap of 4 occurs between primes is between 7 and 11, so a(2)=7 and A001632(2)=11.
Join[{2}, With[{pr = Partition[Prime[Range[86000]], 2, 1]}, Transpose[ Flatten[ Table[Select[pr, #[[2]] - #[[1]] == 2n &, 1], {n, 50}], 1]][[1]]]] (* Harvey P. Dale, Apr 20 2012 *)
a(n)=my(p=2);forprime(q=3,,if(q-p==2*n,return(p));p=q) \\ Charles R Greathouse IV, Nov 20 2012
use ntheory ":all"; my($l,$i,@g)=(2,0); forprimes { $g[($-$l) >> 1] //= $l; while (defined $g[$i]) { print "$i $g[$i]\n"; $i++; } $l=$; } 1e10; # Dana Jacobsen, Mar 29 2019
import numpy from sympy import sieve as prime aupto = 50 A000230 = np.zeros(aupto+1, dtype=object) A000230[0], it = 2, 2 while all(A000230) == 0: gap = (prime[it+1] - prime[it]) // 2 if gap <= aupto and A000230[gap] == 0: A000230[gap] = prime[it] it += 1 print(list(A000230)) # Karl-Heinz Hofmann, Jun 07 2023
Difference two - primes: 5, 7, 11, 13. Difference four - primes: 7, 11, 13, 17. Difference six - primes: 23, 29, 31, 37.
lst = {}; Do[a = 3; While[True, b = NextPrime[a]; If[b - a == n && NextPrime[b, 2] - NextPrime[b] == n, AppendTo[lst, a]; Break[]]; a = b], {n, 2, 68, 2}]; lst Table[SelectFirst[Partition[Prime[Range[16*10^5]],4,1],AllTrue[{#[[2]]-#[[1]],#[[4]]- #[[3]]}, EvenQ]&[[2]]-#[[1]]==#[[4]]-#[[3]]==2n&],{n,35}][[All,1]] (* Harvey P. Dale, Jun 07 2022 *)
Comments