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.

Previous Showing 71-80 of 108 results. Next

A256620 Numbers n such that n is both the average of some twin prime pair p, q (q = p+2) (i.e., n = p+1 = q-1) and is also the arithmetic mean of the four numbers consisting of the two primes before p and the two primes after q.

Original entry on oeis.org

12, 30, 42, 312, 600, 858, 1032, 1290, 1698, 2112, 2688, 3768, 4218, 4230, 4260, 5850, 6132, 6552, 6702, 7212, 7308, 8292, 9420, 9930, 11970, 12042, 12378, 15972, 17190, 17598, 17922, 19470, 19890, 21600, 24180, 26862, 30012, 30852, 32118
Offset: 1

Views

Author

Karl V. Keller, Jr., Apr 24 2015

Keywords

Comments

This sequence is a subsequence A014574 (average of twin prime pairs).
All terms are multiples of 6. - Zak Seidov, Apr 25 2015

Examples

			For n=12: 5,7,11,13,17,19 are six consecutive primes with 13 = 11 + 2 and (5+7+17+19)/4=12.
For n=1032: 1019,1021,1031,1033,1039,1049 are six consecutive primes with 1033 = 1031 + 2 and (1019+1021+1039+1049)/4=1032.
		

Crossrefs

Cf. A077800 (twin primes), A014574.

Programs

  • Mathematica
    avQ[lst_]:=Module[{td=TakeDrop[lst,{3,4}]},Mean[td[[1]]]==Mean[td[[2]]] && td[[1,2]]-td[[1,1]]==2]; Mean[Take[#,{3,4}]]&/@Select[Partition[ Prime[ Range[ 3500]],6,1],avQ] (* The program uses the TakeDrop function from Mathematica version 10.2 *) (* Harvey P. Dale, Jul 16 2015 *)
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(5,200001,2):
      if isprime(i) and isprime(i+2):
        a = prevprime(i)
        b = prevprime(a)
        if a+b+nextprime(i,2)+nextprime(i,3) == 4*(i+1): print(i+1,end=', ')
      else: continue

Extensions

Typo in Name fixed by Zak Seidov, Apr 25 2015

A257529 Prime numbers that have a pentagonal Voronoi cell in the Voronoi diagram of the Ulam prime spiral.

Original entry on oeis.org

2, 3, 11, 13, 17, 19, 29, 37, 53, 83, 97, 101, 103, 107, 109, 113, 137, 149, 151, 163, 191, 197, 211, 223, 227, 241, 257, 271, 281, 293, 307, 337, 347, 373, 401, 419, 431, 433, 461, 521, 523, 541, 563, 569, 571, 577, 593, 619, 653, 659, 673
Offset: 1

Views

Author

Vardan Semerjyan, Apr 28 2015

Keywords

Crossrefs

Programs

  • MATLAB
    sz  = 201; % Size of the N x N square matrix
    mat = spiral(sz); % MATLAB Function
    k = 1;
    for i =1:sz
        for j=1:sz
            if isprime(mat(i,j)) % Check if the number is prime
                % saving indices of primes
                y(k) = i; x(k) = j;
                k = k+1;
            end
        end
    end
    xy = [x',y'];
    [v,c] = voronoin(xy); %  Returns Voronoi vertices V and
    % the Voronoi cells C
    k = 1;
    for i = 1:length(c)
      szv = size(v(c{i},1));
      polyN(i) = szv(1);
      if polyN(i) == 5
            A(k) = mat(y(i),x(i));
            k = k+1;
          end
    end
    % Print terms
    A = sort(A);
    fprintf('A = ');
    fprintf('%i, ',A);
    % Note that the last terms might not be correct.
    % They correspond to the points on the outer edges of the spiral which might be altered when considering a larger spiral.
    % Use larger spiral to get more terms

A257638 Numbers n such that n-25, n-1, n+1 and n+25 are consecutive primes.

Original entry on oeis.org

232962, 311712, 431832, 435948, 473352, 501342, 525492, 596118, 635388, 665922, 699792, 754182, 842448, 1013502, 1017648, 1036002, 1156848, 1255452, 1284738, 1306692, 1479912, 1516128, 1551732, 1560708, 1595928, 1659348, 1690572, 1745112
Offset: 1

Views

Author

Karl V. Keller, Jr., Nov 04 2015

Keywords

Comments

This is a subsequence of A014574 (average of twin prime pairs) and A256753.
The terms ending in 2 and 8 are congruent to 12 mod 30 and 18 mod 30 respectively.
The numbers n-25 and n+1 belong to A033560 (p and p+24 are primes) and A098974 (p where p+24 is the next prime).
The numbers n-25 and n-1 belong to A252089 (p and p+26 are primes).

Examples

			232962 is the average of the four consecutive primes 232937, 232961, 232963, 232987.
311712 is the average of the four consecutive primes 311687, 311711, 311713, 311737.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,1000001,6):
      if isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-25 and nextprime(i+1) == i+25: print (i,end=', ')

A258088 Numbers n such that n is the average of four consecutive primes n-5, n-1, n+1 and n+5.

Original entry on oeis.org

12, 18, 42, 102, 108, 228, 312, 462, 858, 882, 1092, 1302, 1428, 1488, 1872, 1998, 2688, 3462, 4518, 4788, 5232, 5652, 6828, 7878, 8292, 10458, 13692, 13878, 15732, 16062, 16068, 16188, 17388, 19422, 19428, 20748, 21018, 21318, 22278, 23058
Offset: 1

Views

Author

Karl V. Keller, Jr., May 19 2015

Keywords

Comments

Previous name was: Numbers n such that n is the average of some twin prime pair p, q (q=p+2) (i.e., n=p+1=q-1) where p-4, p, q, and q+4 are consecutive primes.
This is a subsequence of A014574 (average of twin prime pairs) and A256753.

Examples

			12 is the average of the four consecutive primes 7, 11, 13, 17.
18 is the average of the four consecutive primes 13, 17, 19, 23.
		

Crossrefs

Cf. A014574, A052378, A077800 (twin primes), A256753.

Programs

  • Mathematica
    a={};Do[If[Prime[x + 3] - Prime[x]==10, AppendTo[a, Prime[x]+ 5]], {x, 1, 4000}]; a (* Vincenzo Librandi, Jul 18 2015 *)
    Mean/@Select[Partition[Prime[Range[3000]],4,1],Differences[#]=={4,2,4}&] (* Harvey P. Dale, Sep 18 2018 *)
  • PARI
    is(n)=isprime(n-5)&&isprime(n-1)&&isprime(n+1)&&isprime(n+5) \\ Charles R Greathouse IV, Aug 28 2015
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,50001,2):
      if isprime(i-1) and isprime(i+1):
        if prevprime(i-1) == i-5 and nextprime(i+1) == i+5: print (i,end=', ')
    

Formula

a(n) = A052378(n) + 5. - Karl V. Keller, Jr., Jul 17 2015

Extensions

New name from Karl V. Keller, Jr., Jul 21 2015

A258879 Numbers k such that k is the average of four consecutive primes k-7, k-1, k+1 and k+7.

Original entry on oeis.org

30, 60, 270, 570, 600, 1230, 1290, 1620, 2340, 2550, 3540, 4020, 4650, 5850, 6270, 6360, 6570, 10860, 11490, 14550, 15270, 17490, 19080, 19380, 19470, 23670, 26730, 29130, 32370, 34260, 41610, 48480, 49200, 49530, 51420, 51480
Offset: 1

Views

Author

Karl V. Keller, Jr., Jun 13 2015

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs), A256753 and A249674 (30*n).

Examples

			For k=30: 23, 29, 31, 37 are consecutive primes (k-7=23, k-1=29, k+1=31, k+7=37).
For k=60: 53, 59, 61, 67 are consecutive primes (k-7=53, k-1=59, k+1=61, k+7=67).
		

Crossrefs

Cf. A014574, A077800 (twin primes), A078854, A249674, A256753.

Programs

  • Magma
    [n: n in [13..2*10^5] | IsPrime(n-7) and IsPrime(n-1) and IsPrime(n+1) and IsPrime(n+7)]; // Vincenzo Librandi Jul 16 2015
    
  • Mathematica
    Select[ 5 Range@ 11000, PrimeQ[# - 7] && PrimeQ[# - 1] && PrimeQ[# + 1] && PrimeQ[# + 7] &] (* Robert G. Wilson v, Jun 28 2015 *)
  • PARI
    main(size)={my(v=vector(size),i,t=8);for(i=1,size,while(1,if(isprime(t-7)&&isprime(t-1)&&isprime(t+1)&&isprime(t+7),v[i]=t;break,t++));t++);return(v);} /* Anders Hellström, Jul 17 2015 */
  • Python
    from sympy import isprime, prevprime, nextprime
    for i in range(0, 10001, 2):
      if isprime(i-1) and isprime(i+1):
        if prevprime(i-1) == i-7 and nextprime(i+1) == i+7: print(i, end=', ')
    

Formula

a(n) = A078854(n) + 7.

A260959 Numbers n such that n is the average of four consecutive primes n-13, n-1, n+1 and n+13.

Original entry on oeis.org

7950, 10500, 32970, 33330, 34470, 36900, 43050, 66360, 71550, 74610, 87120, 89070, 92400, 94560, 95190, 102000, 104310, 121950, 125790, 133980, 148470, 156900, 160710, 168630, 174930, 182640, 194070, 204600, 206250, 230340, 244380, 246510
Offset: 1

Views

Author

Karl V. Keller, Jr., Aug 06 2015

Keywords

Comments

This is a subsequence of A014574 (average of twin prime pairs), A256753 and A249674 (30n).

Examples

			7950 is the average of the four consecutive primes 7937, 7949, 7951, 7963.
10500 is the average of the four consecutive primes 10487, 10499, 10501, 10513.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

A261731 Initial member of five twin prime pairs with gap 210 between them.

Original entry on oeis.org

1308497, 3042491, 3042701, 7445309, 20031101, 31572521, 44687987, 54266291, 141208619, 182316521, 237416369, 357080021, 448436321, 611641187, 699458411, 761126027, 774997367, 794065967, 836452961, 915215591, 944958941, 1009194617, 1581935939, 1763255561, 1871007371
Offset: 1

Views

Author

K. D. Bajpai, Aug 30 2015

Keywords

Comments

More precisely, primes p such that p+2, p+210, p+212, p+420, p+422, p+630, p+632, p+840, p+842 are all primes.
All the terms in this sequence are congruent to 2 (mod 3).

Examples

			1308497 appears in this sequence because: (a) {1308497, 1308499}, {1308707, 1308709}, {1308917, 1308919}, {1309127, 1309129}, and {1309337, 1309339} are five twin prime pairs; (b) the gap between each twin prime pair {1308707 - 1308497} = {1308917-1308707} = {1309127 - 1308917} = {1309337 - 1309127} = 210.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo (100000) | IsPrime(p+2) and IsPrime(p+210) and IsPrime(p+212) and IsPrime(p+420) and IsPrime(p+422) and IsPrime(p+630) and IsPrime(p+632) and IsPrime(p+840) and IsPrime(p+842) ];
    
  • Maple
    select(p -> andmap(isprime, [p, p+2, p+210, p+212, p+420, p+422, p+630, p+632, p+840, p+842]),[seq(p, p=1..2*10^7)]);
  • Mathematica
    k = 210; Select[Prime@Range[6*10^7], PrimeQ[# + 2] && PrimeQ[# + k] && PrimeQ[# + k + 2] && PrimeQ[# + 2 k] && PrimeQ[# + 2 k + 2] && PrimeQ[# + 3 k] &&   PrimeQ[# + 3 k + 2] && PrimeQ[# + 4 k] && PrimeQ[# + 4 k + 2] &]
    Select[Prime[Range[93*10^6]],AllTrue[#+{2,210,212,420,422,630,632,840,842},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 05 2018 *)
  • PARI
    forprime(p= 1,3*10^9, if(isprime(p+2) && isprime(p+210) && isprime(p+212) && isprime(p+420) && isprime(p+422) && isprime(p+630) && isprime(p+632) && isprime(p+840) && isprime(p+842), print1(p,", ")));
    
  • Perl
    use ntheory ":all"; say for sieve_prime_cluster(1,1e10, 2, 210, 212, 420, 422, 630, 632, 840, 842); # Dana Jacobsen, Oct 02 2015

A262176 Numbers k such that k-17, k-1, k+1 and k+17 are consecutive primes.

Original entry on oeis.org

3390, 66570, 70140, 84810, 132330, 136710, 222840, 225750, 242730, 271770, 288930, 320010, 330330, 377370, 390390, 414330, 463890, 489960, 505710, 644670, 758340, 819390, 830310, 857010, 895650, 906540, 908910, 924810, 952380, 968520, 974820
Offset: 1

Views

Author

Karl V. Keller, Jr., Sep 13 2015

Keywords

Comments

This is a subsequence of A014574 (average of twin prime pairs), A256753 and A249674 (30n).

Examples

			3390 is the average of the four consecutive primes 3373, 3389, 3391, 3407.
66570 is the average of the four consecutive primes 66553, 66569, 66571, 66587.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

A262668 Numbers n such that n-19, n-1, n+1 and n+19 are consecutive primes.

Original entry on oeis.org

20982, 28182, 51768, 57222, 76422, 87720, 90678, 104850, 108108, 110730, 141180, 199602, 227112, 248118, 264600, 268842, 304392, 304458, 320082, 322920, 330018, 382728, 401670, 414432, 429972, 450258, 467082, 489408, 520548, 535608, 540120
Offset: 1

Views

Author

Karl V. Keller, Jr., Sep 26 2015

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs) and A256753.
The terms ending in 0 are divisible by 30 (cf. A249674).
The terms ending in 2 and 8 are congruent to 12 mod 30 and 18 mod 30 respectively.

Examples

			20982 is the average of the four consecutive primes 20963, 20981, 20983, 21001.
28182 is the average of the four consecutive primes 28163, 28181, 28183, 28201.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • Mathematica
    Select[Range[6, 600000, 6], And[AllTrue[{# - 1, # + 1}, PrimeQ], NextPrime[# - 1, -1] == # - 19, NextPrime[# + 1] == # + 19] &] (* Michael De Vlieger, Sep 27 2015, Version 10 *)
    Select[Prime@Range@60000, NextPrime[#, {1, 2, 3}] == {18, 20, 38} + # &] + 19 (* Vincenzo Librandi, Oct 10 2015 *)
    Mean/@Select[Partition[Prime[Range[50000]],4,1],Differences[#]=={18,2,18}&] (* Harvey P. Dale, Jan 16 2019 *)
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,1000001,6):
      if isprime(i-1) and isprime(i+1):
        if prevprime(i-1) == i-19 and nextprime(i+1) == i+19 : print(i,end=', ')

A263298 Numbers n such that n-23, n-1, n+1 and n+23 are consecutive primes.

Original entry on oeis.org

19890, 43890, 157770, 400680, 436650, 609780, 681090, 797310, 924360, 978180, 1093200, 1116570, 1179150, 1185930, 1313700, 1573110, 1663350, 2001510, 2110290, 2163570, 2336310, 2372370, 2408280, 2415630, 2562690, 2877840, 2896740, 2961900
Offset: 1

Views

Author

Karl V. Keller, Jr., Oct 13 2015

Keywords

Comments

This is a subsequence of A014574 (average of twin prime pairs), A256753 and A249674 (30n).
From Michel Marcus, Oct 15 2015: (Start)
n-23 and n+1 belong to A242476 (p and p+22 are primes).
n-23 and n-1 belong to A033560 (p and p+24 are primes).
(End)

Examples

			19890 is the average of the four consecutive primes 19867, 19889, 19891, 19913.
43890 is the average of the four consecutive primes 43867, 43889, 43891, 43913.
		

Crossrefs

Cf. A014574, A077800 (twin primes), A249674, A256753.

Programs

  • Mathematica
    {p, q, r, s} = {2, 3, 5, 7};lst={}; While[p<5000000, If[Differences[{p, q, r, s}]=={22, 2, 22}, AppendTo[lst, q + 1]]; {p, q, r, s}={q, r, s,NextPrime@s}]; lst (* Vincenzo Librandi, Oct 14 2015 *)
  • PARI
    isok(n) = isprime(n-1) && isprime(n+1) && (precprime(n-2) == n-23) && (nextprime(n+2) == n+23); \\ Michel Marcus, Oct 14 2015
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,5000001,6):
      if  isprime(i-1) and isprime(i+1) and prevprime(i-1) == i-23 and nextprime(i+1) == i+23: print (i,end=', ')
    
Previous Showing 71-80 of 108 results. Next