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 11-15 of 15 results.

A096710 Quadruply balanced primes: primes which are averages of their immediate neighbor primes, their second neighbor primes, their third neighbor primes and their fourth neighbor primes.

Original entry on oeis.org

98303927, 580868459, 784857323, 857636141, 909894647, 951508837, 1367470823, 1480028171, 1850590099, 2106973159, 2121382079, 2409718043, 2635873907, 2704854637, 3225527099, 3386231579, 3823510039, 3824915671, 3905211517, 4123167667, 4127991383, 4386448117
Offset: 1

Views

Author

Robert G. Wilson v, Jun 28 2004

Keywords

Examples

			98303927 is a member because 98303927 = (98303903 + 98303951)/2 = (98303897 + 98303957)/2 = (98303873 + 98303981)/2 = (98303867 + 98303987)/2.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[p = 2Prime[n]; If[p == Prime[n - 1] + Prime[n + 1], If[ p == Prime[n - 2] + Prime[n + 2], If[p == Prime[n - 3] + Prime[n + 3], If[p == Prime[n - 4] + Prime[n + 4], Print[p/2]; AppendTo[a, p/2]]]]], {n, 6, 117039731}]; a
    Select[Partition[Prime[Range[207405000]],9,1],(#[[1]]+#[[9]])/2 == (#[[2]]+ #[[8]])/2 == (#[[3]]+#[[7]])/2==(#[[4]]+#[[6]])/2==#[[5]]&][[All,5]] (* Harvey P. Dale, Dec 27 2018 *)

Extensions

More terms from Jud McCranie, Sep 29 2006

A126554 Arithmetic mean of two consecutive balanced primes (of order one).

Original entry on oeis.org

29, 105, 165, 192, 234, 260, 318, 468, 578, 600, 630, 693, 840, 962, 1040, 1113, 1155, 1205, 1295, 1439, 1629, 1750, 1830, 2097, 2352, 2547, 2790, 2933, 3135, 3310, 3475, 3685, 3873, 4211, 4433, 4527, 4627, 4674, 4842, 5050, 5110, 5208, 5345, 5390, 5478
Offset: 1

Views

Author

Artur Jasinski, Dec 27 2006

Keywords

Comments

Might be called interprimes of order two, since the arithmetic means of two consecutive odd primes (A024675) sometimes are called interprimes.
Balanced primes of order two (A082077) and doubly balanced primes (A051795) have different definitions.
For primes in this sequence (prime interprimes of order two) see A126555.

Crossrefs

Programs

  • GAP
    P:=Filtered([1..6000],IsPrime);;P1:=List(Filtered(List([0..Length(P)-3],k->List([1..3],j->P[j+k])),i->Sum(i)/3=i[2]),m->m[2]);;
    a:=List([1..Length(P1)-1],n->(P1[n+1]+P1[n])/2); # Muniru A Asiru, Mar 31 2018
  • Mathematica
    b = {}; a = {}; Do[If[PrimeQ[((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2], AppendTo[a, ((Prime[n + 2] + Prime[n + 1])/2 + (Prime[n + 1] + Prime[n])/2)/2]], {n, 1, 1000}]; Do[AppendTo[b, (a[[k + 1]] + a[[k]])/2], {k, 1, Length[a] - 1}]; b
  • PARI
    {m=6000;a=0;p=2;q=3;r=5;while(r<=m,if((p+r)/2==q,if(a>0,print1((a+q)/2,","));a=q);p=q;q=r;r=nextprime(r+1))} \\ Klaus Brockhaus, Jan 05 2007
    

Formula

a(n) = (A006562(n+1)+A006562(n))/2.

Extensions

Edited by Klaus Brockhaus, Jan 05 2007

A082312 Half the difference between start and center prime of the smallest [2n+1]-balanced prime set (A082080).

Original entry on oeis.org

1, 4, 5, 14, 11, 14, 12, 15, 32, 36, 32, 30, 41, 65, 42, 41, 53, 45, 75, 76, 69, 63, 99, 98, 60, 112, 99, 84, 94, 130, 132, 103, 87, 140, 172, 175, 144, 190, 171, 140, 200, 145, 203, 190, 155, 168, 202, 210, 144, 157, 254, 185, 189, 306, 201, 323, 303, 229, 267
Offset: 1

Views

Author

Ralf Stephan, Apr 09 2003

Keywords

Examples

			The smallest 5-balanced prime, 79 (center of 71,73,79,83,89) minus 8 is 71, so a(2)=8/2=4.
		

Crossrefs

Programs

  • PARI
    for(n=1, 80, i=2*n+1; f=0; forprime(p=2, 10^7, s=0; c=i; pr=p-1; t=0; while(c>0, c=c-1; pr=nextprime(pr+1); s=s+pr; if(c==(i-1)/2, t=pr)); if(s/i==t, print1((t-p)/2", "); f=1; break)); if(!f, print1("0, ")))

A160920 Primes which are at the same time balanced primes of order 2, 3 and 4.

Original entry on oeis.org

236429, 1108477, 1829801, 2073263, 2191513, 2192789, 3236267, 3990031, 4248947, 4485683, 4986061, 6869969, 7711079, 8473811, 8480911, 9282173, 9327277, 9350123, 9547303, 9730649, 12077909, 12993917, 13165441, 13398611, 14129761, 14785907
Offset: 1

Views

Author

Keywords

Comments

The intersection of A082077, A082078 and A082079.

Crossrefs

Programs

  • GAP
    P:=Filtered([1,3..2*10^7+1],IsPrime);;
    a:=Intersection(List([2,3,4],b->List(Filtered(List([0..Length(P)-(2*b+1)],k->List([1..2*b+1],j->P[j+k])),i->Sum(i)/(2*b+1)=i[b+1]),m->m[b+1]))); # Muniru A Asiru, Apr 08 2018
  • Maple
    isBalPr := proc(p,o) local r,s,i ; r := p ; if isprime(p) then s := p ; for i from 1 to o do r := nextprime(r) ; s := s+r ; end do: r := p ; for i from 1 to o do r := prevprime(r) ; s := s+r ; end do: s := s/(2*o+1) ; if s = p then true; else false; end if; else false; end if; end proc:
    isA160920 := proc(p) isBalPr(p,2) and isBalPr(p,3) and isBalPr(p,4) ; end proc:
    for i from 10 do p := ithprime(i) ; if isA160920(p) then printf("%d,\n",p); end if; end do: # R. J. Mathar, Dec 15 2010
  • Mathematica
    PrimeNext[n_]:=Module[{k},k=n+1;While[ !PrimeQ[k],k++ ];k];PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];lst={};Do[p=Prime[n];a1=PrimePrev[p];a2=PrimePrev[a1];a3=PrimePrev[a2];a4=PrimePrev[a3];a5=PrimePrev[a4];b1=PrimeNext[p];b2=PrimeNext[b1];b3=PrimeNext[b2];b4=PrimeNext[b3];b5=PrimeNext[b4];If[(a1+a2+a3+a4+b1+b2+b3+b4)/8==p&&(a1+a2+a3+b1+b2+b3)/6==p&&(a1+a2+b1+b2)/4==p,AppendTo[lst,p]],{n,2*9!}];lst

A267028 P(n,k) is an array read by rows, with n > 0 and k=1..5, where row n gives the chain of 5 consecutive primes {p(i), p(i+1), p(i+2), p(i+3), p(i+4)} having the symmetrical property p(i) + p(i+4) = p(i+1) + p(i+3) = 2*p(i+2) for some index i.

Original entry on oeis.org

18713, 18719, 18731, 18743, 18749, 25603, 25609, 25621, 25633, 25639, 28051, 28057, 28069, 28081, 28087, 30029, 30047, 30059, 30071, 30089, 31033, 31039, 31051, 31063, 31069, 44711, 44729, 44741, 44753, 44771, 76883, 76907, 76913, 76919, 76943
Offset: 1

Views

Author

Michel Lagneau, Feb 23 2016

Keywords

Comments

a(3 + 5*(n-1)) = A051795(n).
The immediate objective of the sequence is to examine symmetrical properties in the array P(n,k). It is interesting to note that the results with the dimension 5 are generalizable to the dimensions 7, 9, ...
Notation:
We introduce the following function S(i,j) where row i is defined by {P(i,k)} and row j is defined by {P(j,k)}, k = 1..5. Let S(i, j) = 1 if P(i,1) + P(j,5) = P(i,2) + P(j,4) = P(i,3) + P(j,3), otherwise 0.
Conjecture:
For each integer n, there exists an infinite sequence of integers b(n,m), m = 1, 2, ... such that S(n, b(n,m)) = 1.
The following table gives the first values b(n,m).
Notation in the table: "PS" = primitive sequence.
+----+------------------------------------------------+-----------+
| n | sequences b(n,m), m=1,2,... of index |included in|
+----+------------------------------------------------+-----------+
| 1 | 1, 2, 3, 5, 8, 9, 10, 12, 15, 16, 17, 18, ... | PS |
| 2 | 2, 3, 5, 8, 9, 10, 12, 15, 16, 17, 18, 19, ...| {b(1,m)} |
| 3 | 3, 5, 8, 9, 10, 12, 15, 16, 17, 18, 19, ... | {b(1,m)} |
| 4 | 4, 6, 11, 13, 14, 21, 28, 35, 39, 57, 59, ... | PS |
| 5 | 5, 8, 9, 10, 12, 15, 16, 17, 18, 19, 22, ... | {b(1,m)} |
| 6 | 6, 11, 13, 14, 21, 35, 39, 57, 59, 63, 67, ...| {b(4,m)} |
| 7 | 7, 30, 52, 55, 73, 74, 115, 159, 177, 183, ...| PS |
| 8 | 8, 9, 10, 12, 15, 16, 17, 18, 19, 22, 23, ... | {b(1,m)} |
| 9 | 9, 10, 12, 15, 16, 17, 18, 19, 22, 23, 24, ...| {b(1,m)} |
| 10 | 10, 12, 15, 16, 17, 18, 19, 22, 23, 24, 26, ...| {b(1,m)} |
| 11 | 11, 13, 14, 21, 28, 35, 39, 57, 59, 63, 67, ...| {b(4,m)} |
| 12 | 12, 15, 16, 17, 18, 19, 22, 23, 24, 26, 27, ...| {b(1,m)} |
| 13 | 13, 14, 21, 28, 35, 39, 57, 59, 63, 67, 70, ...| {b(4,m)} |
| .. | ... | ... |
| 20 | 20, 43, 56, 96, 113, 131, 135, 156, 196, ... | PS |
| 25 | 21, 33, 37, 38, 40, 47, 48, 65, 76, 79, 83, ...| PS |
...
Example: S(7, 30) = 1.
We observe primitive sequences {b(n,m)} for n = {1, 4, 7, 20, 25, ...}.
(A primitive sequence is a sequence which is not included in another.)
Properties:
(1) S(i, i)= 1 for all i;
(2) S(i, j) = 1 => S(j, i) = 1;
(3) S(i, j) = 1 and S(j, L) = 1 => S(i, L) = 1.
Example:
For n = 1, {P(1,k)} = {18713, 18719, 18731, 18743, 18749};
we choose, for instance, b(1,2) = 3 => for n = 3, {C(3,k)} = {28051, 28057, 28069, 28081, 28087};
S(1,3) = 1 because 18713 + 28087 = 18719 + 28081 = 18731 + 28069 = 18743 + 28057 = 18749 + 28051 = 46800.
In order to find the index L for satisfying the property (3), we choose, for instance, the index b(3,2) = 8 => for n = 8, {P(8,k)} = {97423, 97429, 97441, 97453, 97459} and S(3, 8) = 1 because 28051 + 97459 = 28057 + 97453 = 28069 + 97441 = 28081 + 97429 = 28087 + 97423 = 125510.
Conclusion: S(1, 3) = 1 and S(3, 8) = 1 => S(1, 8) = 1 with 18713 + 97459 = 18719 + 97453 = 18731 + 97441 = 18743 + 97429 = 18749 + 97423 = 116172.

Examples

			The first row is [18713, 18719, 18731, 18743, 18749] because 18713 + 18749 = 18719 + 18743 = 2*18731 = 37462.
The array starts with:
  [18713, 18719, 18731, 18743, 18749]
  [25603, 25609, 25621, 25633, 25639]
  [28051, 28057, 28069, 28081, 28087]
  ...
		

Crossrefs

Programs

  • Maple
    U:=array(1..50,1..5):W:=array(1..2):kk:=0:
    for n from 4 to 10000 do:
       for m from 2 by -1 to 1 do:
          q:=ithprime(n-m)+ithprime(n+m):W[m]:=q:
        od:
        if W[1]=W[2] and W[1]=2*ithprime(n) then
        kk:=kk+1:U[kk,1]:=ithprime(n-2):
        U[kk,2]:=ithprime(n-1):U[kk,3]:=ithprime(n):
        U[kk,4]:=ithprime(n+1):U[kk,5]:=ithprime(n+2):
        else fi:od:print(U):
        for i from 1 to kk do:
         for j from i+1 to kk do:
          s1:=U[i,1]+U[j,5]:
          s2:=U[i,2]+U[j,4]:
          s3:=U[i,3]+U[j,3]:
          s4:=U[i,4]+U[j,2]:
          s5:=U[i,5]+U[j,1]:
         if s1=s2 and s2=s3 and s3=s4 and s4=s5
         then
         printf("%d %d \n",i,j):
         else fi:
         od:
      od:
Previous Showing 11-15 of 15 results.