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 21-30 of 150 results. Next

A082078 Balanced primes of order three.

Original entry on oeis.org

17, 53, 157, 173, 193, 229, 349, 439, 607, 659, 701, 709, 977, 1153, 1187, 1301, 1619, 2281, 2287, 2293, 2671, 2819, 2843, 3067, 3313, 3539, 3673, 3727, 3833, 4013, 4051, 4517, 4951, 5101, 5897, 6079, 6203, 6211, 6323, 6679, 6869, 7321, 7589, 7643, 7907
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Comments

The arithmetic mean of 6 primes in its "neighborhood"; not to be confused with 'Triply balanced primes' (A081415).
A balanced prime of order three is not necessarily balanced of order one (A006562) or two (A082077), etc. [Typo corrected by Zak Seidov, Jul 23 2008]

Examples

			p = 53 = (41 + 43 + 47 + 53 + 59 + 61 + 67)/7 = 371/7 i.e. it is the arithmetic mean.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..10000],IsPrime);;
    a:=List(Filtered(List([0..1000],k->List([4..10],j->P[j-3+k])), i->
    Sum(i)/7=i[4]),m->m[4]); # Muniru A Asiru, Feb 14 2018
    
  • Mathematica
    Do[s3=Prime[n]+Prime[n+1]+Prime[n+2]; s5=Prime[n-1]+s3+Prime[n+3]; s7=Prime[n-2]+s5+Prime[n+4]; If[Equal[s7/7, Prime[n+1]], Print[Prime[n+1]]], {n, 3, 5000}]
    (* Second program: *)
    With[{k = 3}, Select[MapIndexed[{Prime[First@ #2 + k], #1} &, Mean /@ Partition[Prime@ Range[10^3], 2 k + 1, 1]], SameQ @@ # &][[All, 1]]]  (* Michael De Vlieger, Feb 15 2018 *)
    Select[Partition[Prime[Range[1500]],7,1],Mean[#]==#[[4]]&][[All,4]] (* Harvey P. Dale, Jul 01 2022 *)
  • PARI
    isok(p) = {if (isprime(p), k = primepi(p); if (k > 3, sum(i=k-3, k+3, prime(i)) == 7*p;););} \\ Michel Marcus, Mar 07 2018

A096701 Balanced primes of order nine.

Original entry on oeis.org

983, 2351, 4019, 4093, 4957, 8731, 10009, 10211, 10271, 11549, 11593, 12809, 13831, 17971, 21647, 25633, 30313, 32411, 33911, 34283, 37277, 37511, 38711, 39749, 41617, 41737, 42299, 46643, 48809, 49121, 49451, 51599, 53381, 54541, 54559
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			983 is a member because 983 = (919 + 929 + 937 + 941 + 947 + 953 + 967 + 971 + 977 + 983 + 991 + 997 + 1009 + 1013 + 1019 + 1021 + 1031 + 1033 + 1039)/19 = 18677/19.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..80000],IsPrime);;
    a:=List(Filtered(List([0..6000],k->List([10..28],j->P[j-9+k])),i->
    Sum(i)/19=i[10]),m->m[10]); # Muniru A Asiru, Feb 14 2018
    
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[7500]], 19, 1], #[[10]] == (#[[1]] + #[[2]] + #[[3]] + #[[4]] + #[[5]] + #[[6]] + #[[7]] + #[[8]] + #[[9]] + #[[11]] + #[[12]] + #[[13]] + #[[14]] + #[[15]] + #[[16]] + #[[17]] + #[[18]] + #[[19]])/18 &]][[10]]
    #[[10]] & /@ Select[Partition[Prime[Range[7500]], 19, 1], #[[10]] == Mean[#] &] (* Zak Seidov, Mar 01 2017 *)
  • PARI
    isok(p) = {if (isprime(p), k = primepi(p); if (k > 9, sum(i=k-9, k+9, prime(i)) == 19*p;););} \\ Michel Marcus, Mar 07 2018

A096697 Balanced primes of order five.

Original entry on oeis.org

53, 89, 157, 421, 433, 823, 991, 1297, 1709, 1873, 2347, 2411, 2441, 2729, 2797, 3617, 4793, 5059, 5417, 6343, 6781, 7583, 7933, 8581, 8861, 9029, 9857, 11213, 11953, 12329, 13229, 14081, 14411, 15767, 15889, 16561, 16889, 17029, 20297, 22469
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			53 is a member because 53 = (31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71 + 73)/11. 53 is also an order one balance prime (A006562) and an order three balanced prime (A082078), thus it has an balanced index of three (A096707).
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..70000],IsPrime);;
    a:=List(Filtered(List([0..3000],k->List([6..16],j->P[j-5+k])),i->
    Sum(i)/11=i[6]),m->m[6]); # Muniru A Asiru, Feb 14 2018
    
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[5000]], 11, 1], #[[6]] == (#[[1]] + #[[2]] + #[[3]] + #[[4]] + #[[5]] + #[[7]] + #[[8]] + #[[9]] + #[[10]] + #[[11]])/10 &]][[6]]
    (* Second program: *)
    With[{k = 5}, Select[MapIndexed[{Prime[First@ #2 + k], #1} &, Mean /@ Partition[Prime@ Range[3000], 2 k + 1, 1]], SameQ @@ # &][[All, 1]]] (* Michael De Vlieger, Feb 15 2018 *)
  • PARI
    isok(p) = {if (isprime(p), k = primepi(p); if (k > 5, sum(i=k-5, k+5, prime(i)) == 11*p;););} \\ Michel Marcus, Mar 07 2018

A096698 Balanced primes of order six.

Original entry on oeis.org

71, 211, 397, 409, 1487, 1559, 2281, 4397, 4937, 5347, 5857, 7577, 10399, 11369, 12583, 14843, 19391, 21739, 21787, 22067, 22469, 23789, 25639, 27329, 29537, 29867, 30197, 30911, 33347, 33931, 34267, 35099, 36131, 36691, 37549, 38671
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			71 is a member because 71 = (43 + 47 + 53 + 59 + 61 + 67 + 71 + 73 + 79 + 83 + 89 + 97 + 101)/13.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..90000],IsPrime);;
    b:=6;;
    a:=List(Filtered(List([0..5000],k->List([b+1..3*b+1],j->P[j-b+k])),i->Sum(i)/(2*b+1)=i[b+1]),m->m[b+1]); # Muniru A Asiru, Feb 15 2018
    
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[5000]], 13, 1], #[[7]] == (#[[1]] + #[[2]] + #[[3]] + #[[4]] + #[[5]] + #[[6]] + #[[8]] + #[[9]] + #[[10]] + #[[11]] + #[[12]] + #[[13]])/12 &]][[7]]
    Transpose[Select[Partition[Prime[Range[5000]],13,1],Total[#]/13==#[[7]]&]][[7]]  (* Harvey P. Dale, Feb 25 2011 *)
  • PARI
    isok(p) = {if (isprime(p), k = primepi(p); if (k >6, sum(i=k-6, k+6, prime(i)) == 13*p;););} \\ Michel Marcus, Mar 07 2018

A096699 Balanced primes of order seven.

Original entry on oeis.org

29, 977, 1381, 1439, 3109, 3539, 4357, 4397, 5563, 7159, 8273, 8737, 10711, 11117, 13109, 13841, 15101, 18731, 18839, 20543, 21391, 21851, 23459, 24877, 27653, 28477, 28697, 30677, 32029, 32971, 34631, 35863, 36979, 37019, 37529, 38189
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			29 is a member because 29 = (5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59)/15.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..70000],IsPrime);;
    a:=List(Filtered(List([0..5000],k->List([8..22],j->P[j-7+k])),i->
    Sum(i)/15=i[8]),m->m[8]); # Muniru A Asiru, Feb 14 2018
    
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[5000]], 15, 1], #[[8]] == (#[[1]] + #[[2]] + #[[3]] + #[[4]] + #[[5]] + #[[6]] + #[[7]] + #[[9]] + #[[10]] + #[[11]] + #[[12]] + #[[13]] + #[[14]] + #[[15]])/14 &]][[8]]
    (* Second program: *)
    With[{k = 7}, Select[MapIndexed[{Prime[First@ #2 + k], #1} &, Mean /@ Partition[Prime@ Range[5000], 2 k + 1, 1]], SameQ @@ # &][[All, 1]]] (* Michael De Vlieger, Feb 15 2018 *)
  • PARI
    isok(p) = {if (isprime(p), k = primepi(p); if (k > 7, sum(i=k-7, k+7, prime(i)) == 15*p;););} \\ Michel Marcus, Mar 07 2018

A096700 Balanced primes of order eight.

Original entry on oeis.org

37, 151, 173, 487, 1153, 2621, 4357, 4451, 5189, 5209, 5431, 6131, 7499, 8429, 8641, 9323, 10093, 10321, 10883, 10949, 11117, 11213, 11369, 11821, 12583, 16001, 16741, 18169, 18289, 22067, 23761, 25747, 29989, 33589, 36691, 39671, 39749, 39779
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			37 is a member because 37 = (7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71)/17.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..50000],IsPrime);;
    a:=List(Filtered(List([0..5000],k->List([1..17],j->P[j+k])),i->Sum(i)/17=i[9]),m->m[9]); # Muniru A Asiru, Mar 03 2018
  • Mathematica
    Select[Partition[Prime[Range[5000]],17,1],Mean[#]==#[[9]]&][[;;,9]] (* Harvey P. Dale, Jul 06 2023 *)

Extensions

Incorrect previous Mathematica program deleted by Harvey P. Dale, Jul 06 2023

A096702 Balanced primes of order ten.

Original entry on oeis.org

5503, 6301, 8233, 14489, 14591, 14747, 15907, 17789, 20543, 22067, 22699, 23321, 24593, 25423, 26251, 26347, 28477, 29059, 33161, 41023, 42337, 44021, 48187, 51551, 53279, 55001, 59693, 64661, 78173, 81457, 82561, 84017, 85621, 88301
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			5503 is a member because
5503 = (5431 + 5437 + 5441 + 5443 + 5449 + 5471 + 5477 + 5479 + 5483 + 5501 + 5503 + 5507 + 5519 + 5521 + 5527 + 5531 + 5557 + 5563 + 5569 + 5573 + 5581)/21 = 115563/21.
		

Crossrefs

Programs

  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[10000]], 21, 1], #[[11]] == (#[[1]] + #[[2]] + #[[3]] + #[[4]] + #[[5]] + #[[6]] + #[[7]] + #[[8]] + #[[9]] + #[[10]] + #[[12]] + #[[13]] + #[[14]] + #[[15]] + #[[16]] + #[[17]] + #[[18]] + #[[19]] + #[[20]] + #[[21]])/20 &]][[11]]
    Transpose[Select[Partition[Prime[Range[9000]],21,1],Total[#]/21 == #[[11]]&]][[11]] (* Harvey P. Dale, Mar 09 2014 *)

A096703 Balanced primes of order eleven.

Original entry on oeis.org

173, 353, 631, 827, 3329, 4723, 13693, 17789, 20947, 21059, 21503, 23563, 23599, 27751, 29759, 35419, 36781, 37991, 44939, 52021, 57163, 57269, 57719, 59663, 68713, 70529, 70879, 71399, 75541, 76949, 78301, 79621, 94399, 101929, 104759
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			173 is a member because 173 = (109 + 113 + 127 + 131 + 137 + 139 + 149 + 151 + 157 + 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227 + 229 + 233)/23 = 3979/23.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..150000],IsPrime);;
    a:=List(Filtered(List([0..12000],k->List([1..23],j->P[j+k])),i->Sum(i)/23=i[12]),m->m[12]); # Muniru A Asiru, Mar 04 2018
  • Mathematica
    Transpose[ Select[ Partition[ Prime[ Range[10000]], 23, 1], #[[12]] == (#[[1]] + #[[2]] + #[[3]] + #[[4]] + #[[5]] + #[[6]] + #[[7]] + #[[8]] + #[[9]] + #[[10]] + #[[11]] + #[[13]] + #[[14]] + #[[15]] + #[[16]] + #[[17]] + #[[18]] + #[[19]] + #[[20]] + #[[21]] + #[[22]] + #[[23]])/22 &]][[12]]
    Transpose[Select[Partition[Prime[Range[11000]],23,1],Mean[#] == #[[12]]&]][[12]] (* Harvey P. Dale, Nov 06 2011 *)

A096704 Balanced primes of order twelve.

Original entry on oeis.org

157, 173, 709, 827, 1999, 2689, 6803, 11351, 11489, 12757, 15277, 33071, 37967, 38449, 46751, 47303, 51599, 53113, 56779, 57269, 59107, 62731, 62743, 62791, 63649, 77023, 79357, 81553, 81649, 81953, 85621, 96377, 108139, 113983, 117839
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			157 is a term because 157 = (97 + 101 + 103 + 107 + 109 + 113 + 127 + 131 + 137 + 139 + 149 + 151 + 157 + 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227)/25 = 3925/25.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..150000],IsPrime);;
    a:=List(Filtered(List([0..12000],k->List([1..25],j->P[j+k])),i->Sum(i)/25=i[13]),m->m[13]); # Muniru A Asiru, Mar 04 2018
  • Mathematica
    Select[Partition[Prime[Range[12000]],25,1],Mean[#]==#[[13]]&][[All,13]] (* Harvey P. Dale, Jun 28 2020 *)

A006489 Numbers k such that k-6, k, and k+6 are primes.

Original entry on oeis.org

11, 13, 17, 23, 37, 47, 53, 67, 73, 103, 107, 157, 173, 233, 257, 263, 277, 353, 373, 563, 593, 607, 613, 647, 653, 733, 947, 977, 1097, 1103, 1123, 1187, 1223, 1283, 1297, 1367, 1433, 1453, 1487, 1493, 1607, 1613, 1663, 1747, 1753, 1783, 1867, 1873
Offset: 1

Views

Author

Keywords

Comments

A006562 without the first term 5 is a subsequence. - Zak Seidov, Apr 19 2021

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A023201.
Cf. A006562.

Programs

  • Haskell
    a006489 n = a006489_list !! (n-1)
    a006489_list = filter
       ((== 1) . a010051 . (subtract 6)) $ dropWhile (<= 6) a023201_list
    -- Reinhard Zumkeller, Feb 25 2013
    
  • Mathematica
    Select[Prime[Range[300]],And@@PrimeQ[#+{6,-6}]&] (* Harvey P. Dale, May 21 2012 *)
  • PARI
    is(n)=isprime(n-6) && isprime(n) && isprime(n+6) \\ Charles R Greathouse IV, Feb 07 2017

Extensions

More terms from James Sellers, Dec 24 1999
Previous Showing 21-30 of 150 results. Next