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.

Showing 1-10 of 10 results.

A096707 Balanced primes (A090403) of index 3.

Original entry on oeis.org

53, 607, 977, 1289, 2083, 2351, 4013, 5563, 8803, 10657, 11117, 12583, 14747, 16433, 18731, 22067, 22699, 28477, 32833, 39227, 39749, 41957, 44357, 46229, 46643, 50053, 50123, 51869, 53617, 54469, 56167, 63377, 63527, 66797, 74729, 75217, 76597, 77023, 93997
Offset: 1

Views

Author

Robert G. Wilson v, Jun 28 2004

Keywords

Examples

			607 is a member because 607 = (601 + 607 + 613)/3 =
(593 + 599 + 601 + 607 + 613 + 617 + 619)/7 = (401 + ... + 607 + ... + 823)/65.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; Prime[ Select[ Range[2, 250], f[ # ] == 3 &]]

Extensions

a(37)-a(39) from Robert Price, Nov 29 2023

A096706 Balanced primes (A090403) of index 2.

Original entry on oeis.org

211, 263, 349, 397, 409, 439, 709, 751, 787, 827, 1153, 1187, 1259, 1487, 1523, 1531, 2281, 2287, 2347, 2621, 3037, 3109, 3313, 3329, 3539, 3673, 4357, 4397, 4493, 4951, 4969, 4987, 5189, 5303, 5347, 5857, 6323, 6337, 7583, 7907, 7933, 8429, 8713, 8821, 8951
Offset: 1

Views

Author

Robert G. Wilson v, Jun 28 2004

Keywords

Examples

			263 is a member because 263 = (257 + 263 + 269)/3
= (179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227 + 229 + 233 + 239 + 241 + 251 + 257 + 263 + 269 + 271 + 277 + 281 + 283 + 293 + 307 + 311 + 313 + 317 + 331 + 337 + 347 + 349 + 353)/31.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; Prime[ Select[ Range[2, 250], f[ # ] == 2 &]]

Extensions

a(45) from Robert Price, Nov 29 2023

A096709 Balanced primes (A090403) of index 5.

Original entry on oeis.org

173, 124991, 232607, 491423, 701489, 1356337, 2455681, 3128803, 5218607, 9459683, 10563461, 13228247, 14606029, 16282921, 18216137, 20378273, 21622201, 35201909, 36549169, 38638969, 39246689, 42074017, 43048039, 48961859
Offset: 1

Views

Author

Robert G. Wilson v, Jun 28 2004

Keywords

Examples

			124991 is a member because 124991 = (124673 + ... + 125329)/59
= (124543 + ... + 125423)/75 = (124193 + ... + 125777)/137 = (124133 + ... + 125887)/151
= (123931 + ... + 126031)/181.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; Prime[ Select[ Range[2, 25797], f[ # ] == 5 &]]

Extensions

a(6)-a(24) from Donovan Johnson, Apr 09 2010

A096695 Least balanced prime (A090403) of index n (A096693).

Original entry on oeis.org

2, 5, 211, 53, 157, 173, 304517
Offset: 0

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Examples

			a(1) = 5 because 5 = (3 + 5 + 7)/3.
a(2) = 211 because 211 = (199 + 211 + 223)/3
= (179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227 + 229 + 233 + 239 + 241)/13.
a(3) = 53 because 53 = (47 + 53 + 59)/3 = (41 + 43 + 47 + 53 + 59 + 61 + 67)/7
= (31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71 + 73)/11.
a(4) = 157 because 157 = (151 + 157 + 163)/3 = (139 + 149 + 151 + 157 + 163 + 167 + 173)/7
= (131 + 137 + 139 + 149 + 151 + 157 + 163 + 167 + 173 + 179 + 181)/11
= (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.
a(5) = 173 because 173 = (167 + 173 + 179)/3 = (157 + 163 + 167 + 173 + 179 + 181 + 191)/7
= (131 + 137 + 139 + 149 + 151 + 157 + 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211 + 223)/17
= (109 + 113 + 127 + 131 + 137 + 139 + 149 + 151 + 157 + 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227 + 229 + 233)/23
= (107 + 109 + 113 + 127 + 131 + 137 + 139 + 149 + 151 + 157 + 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211 + 223 + 227 + 229 + 233 + 239)/25.
a(6) = 304517 because 304517 = (304511 + 304517 + 304523)/3
= (304489 + 304501 + 304511 + 304517 + 304523 + 304537 + 304541)/7
= (304481 + 304489 + 304501 + 304511 + 304517 + 304523 + 304537 + 304541 + 304553)/9
= (303691 + ... + 304517 + ... + 305339)/135 = (303649 + ... + 304517 + ... + 305369)/143
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; t = Table[0, {15}]; Do[a = f[n]; If[a < 50 && t[[a + 1]] == 0, t[[a + 1]] = Prime[n]; Print[a + 1, " = ", Prime[n]]], {n, 32000}]; t

A096708 Balanced primes (A090403) of index 4.

Original entry on oeis.org

157, 353, 8233, 23893, 26183, 30197, 63697, 118831, 131041, 150203, 152213, 167033, 198013, 293087, 341303, 383983, 494051, 494723, 534007, 551569, 601949, 603541, 629203, 666697, 671287, 679417, 688907, 768203, 787207, 796867, 826039
Offset: 1

Views

Author

Robert G. Wilson v, Jun 28 2004

Keywords

Examples

			353 is a member because 353 = (281 + ...353 + ... + 421)/23
= (271 + .. + 353 + ... + 433)/27 = (241 + ... + 353 + ... + 461)/37 = (227 + ... + 353 + ... + 487)/45.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; Prime[ Select[ Range[2, 25797], f[ # ] == 4 &]]

Extensions

a(17)-a(31) from Donovan Johnson, Apr 09 2010

A096711 Number of balanced primes (A090403) less than 10^n.

Original entry on oeis.org

1, 8, 57, 308, 1989, 13161, 94939
Offset: 1

Views

Author

Robert G. Wilson v, Jul 03 2004

Keywords

Comments

The average number of balanced primes, p_n, seems to reach a maximum at the 85th prime, 439, of 32 balanced primes.
A096711(n)/A006880(n) begins 25%, 32%, 33.93%, 25.06%, 20.74%

Crossrefs

Cf. A090403.

Programs

  • Mathematica
    f[n_] := f[n] = Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, Return[1]]; k++; s = s + Prime[n - k] + Prime[n + k]]; 0]; f[1] = 0; Do[ f[n], {n, 10000}]; s = Prime[ Select[ Range[ 10000], f[ # ] == 1 &]]; Table[ Length[ Select[s, # < 10^n &]], {n, 5}]

Extensions

a(6)-a(7) from Donovan Johnson, Apr 09 2010

A096694 Lesser of twin balanced primes (A090403).

Original entry on oeis.org

149, 227, 419, 1997, 3329, 3671, 5501, 6449, 13691, 15887, 21647, 22481, 26711, 27749, 31247, 32411, 32831, 37547, 39227, 41759, 44027, 47777, 49121, 50261, 53231, 54539, 54917, 55217, 64877, 69149, 71411, 74717, 90821, 93239, 107069
Offset: 1

Views

Author

Robert G. Wilson v, Jun 28 2004

Keywords

Crossrefs

Cf. A090403.

Programs

  • Mathematica
    f[n_] := f[n] = Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; p = Prime[ Select[ Range[2, 22456], f[ # ] != 0 &]]; Transpose[ Select[ Partition[p, 2, 1], #[[1]] + 2 == #[[2]] &]][[1]]

A096693 Balance index of each prime.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 4, 0, 0, 5, 1, 0, 0, 1, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 1, 0, 1, 0, 1, 0, 2, 0, 2, 1, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
Offset: 1

Views

Author

Robert G. Wilson v, Jun 26 2004

Keywords

Comments

a(n) = the number of values of k for which the n-th prime is equal to the arithmetic average of the k primes above and below it.
The average of the first n balance indexes appears to reach a global maximum of 0.588 when n = 85, (prime(85) = 439).

Examples

			a(3) = 1 because the third prime, 5, equals (3 + 7)/2.
a(16) = 3 because the sixteenth prime, 53, equals (47 + 59)/2 = (41 + 43 + 47 + 59 + 61 + 67)/6 = (31 + 37 + 41 + 43 + 47 + 59 + 61 + 67 + 71 + 73)/10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, k = 1, p = Prime[n], s = Plus @@ Table[ Prime[i], {i, n - 1, n + 1}]}, While[k != n - 1, If[s == (2k + 1)p, c++ ]; k++; s = s + Prime[n - k] + Prime[n + k]]; c]; Table[ f[n], {n, 105}]
  • PARI
    b-file generator: {max_n = 10^4; for (n = 1, max_n, c = 0; k = 1; p = prime(n); s = p; while (k < n, s = s + prime(n - k) + prime(n + k); if (s == (2 * k + 1) * p, c++); k++;); print(n " " c);) ;}

Extensions

Corrected and edited by Christopher Hunt Gribble, Apr 06 2010

A089180 a(n) is the smallest number m such that d(m) = d(m+1) = ... = d(m+n), where d(k) = prime(k+1) - prime(k) (A001223).

Original entry on oeis.org

2, 54, 654926, 6904737
Offset: 1

Views

Author

Farideh Firoozbakht, Dec 07 2003

Keywords

Comments

a(5) is greater than 105000000.
The a(n)-th prime is the smallest start of n+2 consecutive primes in arithmetic progression. - Jens Kruse Andersen, Jun 14 2014

Examples

			a(3) = 659426 because d(659426) = d(659426+1) = d(659426+2) = d(6594286+3) or 9843019, 9843049, 9843079, 9843109, 9843139 are five consecutive primes with same difference and prime(659426) = 9843019 is the smallest prime number with this property.
Also a(4) = 6904737 because d(6904737) = d(6904737+1) = ... = d(6904737+4) or 121174811, 121174841, 121174871, 121174901, 121174931, 121174961 are six consecutive primes with same difference and prime(6904737) = 121174811 is the smallest prime number with this property.
		

Crossrefs

Formula

A000040[a(n)]=A006560(n+2). - R. J. Mathar, Aug 10 2007
a(n) = A000720(A006560(n+2)). - Jens Kruse Andersen, Jun 14 2014

A096696 Consider the n-th prime, p_n, as the beginning of 2k+1 consecutive primes; then a(n) = p_(n+k) a balanced prime of order k, k maximized, or 0 if no such prime exists.

Original entry on oeis.org

0, 5, 29, 37, 0, 0, 0, 0, 0, 149, 53, 0, 53, 71, 137, 227, 0, 0, 89, 79, 0, 0, 0, 0, 179, 0, 0, 173, 173, 0, 0, 419, 0, 157, 0, 157, 173, 0, 173, 0, 263, 0, 0, 0, 0, 211, 229, 0, 353, 397, 0, 0, 353, 359, 409, 577, 0, 353, 383, 353, 0, 0, 0, 0, 0, 0, 349, 349, 0, 0, 0, 397, 373
Offset: 1

Views

Author

Robert G. Wilson v, Jul 02 2004

Keywords

Comments

a(n) either equals 0 or belongs to A090403.

Examples

			a(2) = 5 because beginning with the second prime, 3, there is a run of three prime, (3,5,7) the average and median of which is 5.
a(5) = 0 because there does not exist a run of 2k + 1 primes such that the arithmetic mean and the median are the same.
		

Crossrefs

Cf. A090403.

Programs

  • Mathematica
    f[n_] := Block[{k = 1, p = 0}, While[k < 10^4, If[(Plus @@ Table[Prime[i], {i, n, n + 2k}]) == (2k + 1)Prime[n + k], p = Prime[n + k]]; k++ ]; p]; Table[ f[n], {n, 74}]
Showing 1-10 of 10 results.