A089218 Erroneous version of A052195.
69593, 110651, 228647, 250889, 318919, 396449, 421913, 498271, 507431, 554317
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.
642427, 642457, 642487, 642517 are consecutive primes, so 642427 is in the sequence.
f:=func; a:=[]; for p in PrimesInInterval(2,13000000) do if (f(p)-p eq 30) and (f(f(p))-p eq 60) and (f(f(f(p)))-p eq 90) then Append(~a,p); end if; end for; a; // Marius A. Burtea, Jan 04 2020
p := 2 : q := 3 : r := 5 : s := 7 : for i from 1 do if q-p = 30 and r-q=30 and s-r=30 then printf("%d,\n",p) ; fi ; p := q ; q := r ; r := s ; s := nextprime(r) ; od: # R. J. Mathar, Apr 12 2008
p=2; q=3; r=5; s=7; A052243 = Reap[For[i=1, i<1000000, i++, If[ q-p == 30 && r-q == 30 && s-r == 30 , Print[p]; Sow[p]]; p=q; q=r; r=s; s=NextPrime[r]]][[2, 1]] (* Jean-François Alcover, Jun 28 2012, after R. J. Mathar *) Transpose[Select[Partition[Prime[Range[1100000]],4,1],Union[ Differences[#]] =={30}&]][[1]] (* Harvey P. Dale, Jun 17 2014 *)
A052243(n,p=2,print_all=0,g=30,c,o)={forprime(q=p+1,,if(p+g!=p=q, next, q!=o+2*g, c=2, c++>3, print_all&& print1(o-g","); n--||break); o=q-g);o-g} \\ optional 2nd arg specifies starting point, allows to define: next_A052243(p)=A052243(1,p+1) \\ replacing older code from 2008. - M. F. Hasler, Oct 26 2018
The prime 7 is not in the list, because in the triple (7, 11, 13) of successive primes, 11 is not equal (7 + 13)/2 = 10. The second term, 47, is the first prime in the triple (47, 53, 59) of primes, where 53 is the mean of 47 and 59.
a122535 = a000040 . a064113 -- Reinhard Zumkeller, Jan 20 2012
Clear[d2, d1, k]; d2[n_] = Prime[n + 2] - 2*Prime[n + 1] + Prime[n]; d1[n_] = Prime[n + 1] - Prime[n]; k[n_] = -d2[n]/(1 + d1[n])^(3/2); Flatten[Table[If[k[n] == 0, Prime[n], {}], {n, 1, 1000}]] (* Roger L. Bagula, Nov 13 2008 *) Transpose[Select[Partition[Prime[Range[750]], 3, 1], #[[2]] == (#[[1]] + #[[3]])/2 &]][[1]] (* Harvey P. Dale, Jan 09 2011 *)
A122535()={n=3;ctr=0;while(ctr<50, avgg=( prime(n-2)+prime(n) )/2; if( prime(n-1) ==avgg, ctr+=1;print( ctr," ",prime(n-2) ) );n+=1); } \\ Bill McEachen, Jan 19 2015
a(5) = 642427, 642457, 642487, 642517 are the smallest consecutive primes with 3 consecutive gaps of 30, cf. A052243. From _M. F. Hasler_, Nov 06 2018: (Start) Other terms are also initial terms of corresponding sequences: a(1) = 251 = A033451(1) = A054800(1), start of first CPAP-4 with common gap of 6, a(2) = 111497 = A033447(1), start of first CPAP-4 with common gap of 12, a(3) = 74453 = A033448(1) = A054800(25), first CPAP-4 with common gap of 18, a(4) = 1397609 = A052242(1), start of first CPAP-4 with common gap of 24, a(5) = 642427 = A052243(1) = A052195(16), first CPAP-4 with common gap of 30, a(6) = 5321191 = A058252(1) = A161534(26), first CPAP-4 with common gap 36 = 6^2, a(7) = 23921257 = A058323(1), start of first CPAP-4 with common gap of 42, a(8) = 55410683 = A067388(1), start of first CPAP-4 with common gap of 48, a(9) = 400948369 = A259224(1), start of first CPAP-4 with common gap of 54, a(10) = 253444777 = A210683(1) = A089234(417), CPAP-4 with common gap of 60, a(11) = 1140813701 = A287547(1), start of first CPAP-4 with common gap of 66, a(12) = 491525857 = A287550(1), start of first CPAP-4 with common gap of 72, a(13) = 998051413 = A287171(1), start of first CPAP-4 with common gap of 78, a(14) = 2060959049 = A287593(1), start of first CPAP-4 with common gap of 84, a(15) = 4480114337 = A286817(1) = A204852(444), common distance 90. (End)
Transpose[Flatten[Table[Select[Partition[Prime[Range[2000000]],4,1], Union[ Differences[ #]] =={6n}&,1],{n,7}],1]][[1]] (* Harvey P. Dale, Aug 12 2012 *)
a(n, p=[2, 0, 0], d=6*[n, n, n])={while(p+d!=p=[nextprime(p[1]+1), p[1], p[2]], ); p[3]-d[3]} \\ after M. F. Hasler in A052243; Graziano Aglietti (mg5055(AT)mclink.it), Aug 22 2010, Corrected by M. F. Hasler, Nov 06 2018
A052239(n, p=2, c, o)={n*=6; forprime(q=p+1, , if(p+n!=p=q, next, q!=o+2*n, c=2, c++>3, break); o=q-n); o-n} \\ M. F. Hasler, Nov 06 2018
max = 30000; Reap[For[p = 2; q = 3, p < max, p = q, q = NextPrime[p]; If[q - p == 30, Sow[p]]]][[2, 1]] (* Jean-François Alcover, Sep 02 2018 *) Select[Partition[Prime[Range[5000]],2,1],#[[2]]-#[[1]]==30&][[All,1]] (* Harvey P. Dale, Dec 25 2019 *)
a(3) = 704321 is followed by 704357 and 704393, consecutive primes with equal distance of d = 36.
Select[Partition[Prime[Range[255000]],3,1],Differences[#]=={36,36}&][[All,1]] (* Harvey P. Dale, Feb 16 2018 *)
is(n)=nextprime(n+1)==n+36 && nextprime(n+37)==n+72 && isprime(n) \\ Charles R Greathouse IV, Jan 07 2013
a(2)=47 and it is the lower border of a dd pattern: 47[6 ]53[6 ]59. a(10)=6314393 and a(10)+54=6314447, a(10)+108=6314501 are consecutive primes and 6314393 is the smallest prime prior to a (54,54) difference pattern of A001223.
a = Table[0, {100}]; NextPrime[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = q = r = 0; Do[r = NextPrime[r]; If[r + p == 2q && r - q < 201 && a[[(r - q)/2]] == 0, a[[(r - q)/2]] = p]; p = q; q = r, {n, 1, 10^6}]; a (* Typos fixed by Zak Seidov, May 01 2020 *)
list(n)=ve=vector(n);ppp=2;pp=3;forprime(p=5,,d=p-pp;if(pp-ppp==d,i=d\6+1;if(i<=n&&ve[i]==0,ve[i]=ppp;print1(".");vecprod(ve)>0&&return(ve)));ppp=pp;pp=p) \\ Jeppe Stig Nielsen, Apr 17 2022
110681 is separated from both the next lower prime and the next higher prime by 30
lst={}; Do[p=Prime[n]; If[p-Prime[n-1] == Prime[n+1]-p == 6*5, AppendTo[lst,p]], {n,2,2*8!}]; lst (* Vladimir Joseph Stephan Orlovsky, May 20 2010 *)
is_A053075(n)={precprime(n-1)==n-30&&nextprime(n+1)==n+30&&isprime(n)} \\ M. F. Hasler, Jan 02 2020
a(1) = A047948(1) = 47 is the least prime p(k) such that p(k+1) - p(k) = p(k+2) - p(k+1) = 6. a(2) = A052188(1) = 199 is the least prime p(k) > 47 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 12. a(3) = A052189(1) = 20183 is the least prime p(k) > 199 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 18. a(4) = A052190(1) = 40039 is the least prime p(k) > 20183 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 24. a(5) = A052195(1) = 69593 is the least prime p(k) > 40039 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 30.
g=6;o=2;forprime(p=2,,o+g==(o=p)||next;nextprime(p+1)==p+g||next;print1(p-g",");g+=6)
[p:p in PrimesUpTo(14000000)| NextPrime(p)-p eq 48 and NextPrime(p+48)-p eq 96]; // Marius A. Burtea, Jan 03 2020
Select[Partition[Prime[Range[900000]],3,1],Differences[#]=={48,48}&] [[All,1]] (* Harvey P. Dale, Aug 23 2021 *)
vecextract( A134123, select(t->t==48, A134123[^1]-A134123[^-1], 1)) \\ Terms of A134123 with indices corresponding to first differences of 48: gives a(1..56) from A134123(1..10^4).
Comments