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-4 of 4 results.

A077389 Smallest integer that is the average of n consecutive primes.

Original entry on oeis.org

2, 4, 5, 9, 79, 12, 17, 30, 261, 30, 49, 23, 71, 51, 29, 31, 37, 39, 125, 56, 95, 52, 38, 133, 157, 113, 353, 70, 347, 89, 111, 139, 179, 187, 281, 124, 137, 95, 347, 100, 153, 105, 491, 273, 185, 177, 377, 199, 599, 1032, 149, 274, 110, 200, 485, 251, 155, 315
Offset: 1

Views

Author

Amarnath Murthy, Nov 06 2002

Keywords

Examples

			a(5) = 79 because the average of the 5 consecutive primes 71, 73, 79, 83, and 89 is 79, and this is the smallest such set: for example, the average of 7, 11, 13, 17, and 19 is 13.4, which is not an integer.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, t},While[t = Table[Prime[i], {i, k, k + n - 1}]; Mod[Plus @@ t, n] > 0, k++ ];t];Mean /@ Table[f[n], {n, 58}] (* Ray Chandler, Oct 09 2006 *)
  • PARI
    a(n) = {my(v=primes(n), s=vecsum(v), p=prime(n)); while(s%n, s-=v[1]-p=nextprime(p+1); v=concat(v[2..n], p)); s/n; } \\ Jinyuan Wang, Sep 05 2020

Formula

a(n) = A077388(n)/n.

Extensions

More terms from Sascha Kurz, Jan 30 2003
Change to definition based on comment by Zak Seidov, Mar 20 2013

A077388 Row sums of the triangle in A122820.

Original entry on oeis.org

2, 8, 15, 36, 395, 72, 119, 240, 2349, 300, 539, 276, 923, 714, 435, 496, 629, 702, 2375, 1120, 1995, 1144, 874, 3192, 3925, 2938, 9531, 1960, 10063, 2670, 3441, 4448, 5907, 6358, 9835, 4464, 5069, 3610, 13533, 4000, 6273, 4410, 21113, 12012, 8325
Offset: 1

Views

Author

Amarnath Murthy, Nov 06 2002

Keywords

Comments

19318176 = A077388(1296) = A077388(2088). Are there any other pairs?. - Naohiro Nomoto, May 17 2003

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, t},While[t = Table[Prime[i], {i, k, k + n - 1}]; Mod[Plus @@ t, n] > 0, k++ ];t];Total /@ Table[f[n], {n, 45}] (* Ray Chandler, Oct 09 2006 *)

Extensions

More terms from Sascha Kurz, Jan 30 2003
Name corrected by Sean A. Irvine, May 18 2025

A132809 First prime in a sequence of n consecutive odd primes with integral arithmetic mean.

Original entry on oeis.org

3, 3, 5, 71, 5, 7, 17, 239, 13, 29, 5, 43, 23, 5, 5, 7, 7, 79, 17, 47, 11, 109, 73, 97, 53, 271, 13, 263, 23, 41, 61, 97, 101, 181, 41, 47, 13, 233, 13, 53, 13, 359, 151, 71, 61, 239, 73, 443, 859, 29, 131, 131, 61, 313, 101, 19, 151, 521, 3, 571, 31, 7, 79, 109, 97, 53, 53
Offset: 2

Views

Author

Enoch Haga, Sep 01 2007

Keywords

Comments

See A054892 for another version.

Examples

			For n=2 we add prime(2)+prime(3)=3+5=8 which is already a multiple of n=2, so we add the first of the primes, 3, at a(n=2).
For n=5 we test 3+5+7+11+13=39 against being a multiple of n=5, then 5+7+11+13+17=53, then 7+11+13+17+19=67 etc. and find that 71+73+79+83+89=395 is a multiple. We place the smallest member in this sequence of 5 primes, 71, at a(n=5).
		

Crossrefs

Programs

  • Maple
    A132809 := proc(n) local i,j ; for i from 2 do if add( ithprime(i+j),j=0..n-1) mod n = 0 then RETURN(ithprime(i)) ; fi ; od: end: seq(A132809(n),n=2..80) ; # R. J. Mathar, Nov 27 2007

Formula

a(n) = {min (prime(k)): sum_{i=0..n-1} prime(k+i) = 0 mod n, k>1 }. - R. J. Mathar, Nov 27 2007

Extensions

Edited by R. J. Mathar, Nov 27 2007

A122820 Array read by rows in which n-th row contains n successive primes with least sum divisible by n.

Original entry on oeis.org

2, 3, 5, 3, 5, 7, 5, 7, 11, 13, 71, 73, 79, 83, 89, 5, 7, 11, 13, 17, 19, 7, 11, 13, 17, 19, 23, 29, 17, 19, 23, 29, 31, 37, 41, 43, 239, 241, 251, 257, 263, 269, 271, 277, 281, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 5, 7, 11, 13, 17
Offset: 1

Views

Author

Ray Chandler, Sep 27 2006

Keywords

Examples

			Triangle begins:
2
3 5
3 5 7
5 7 11 13
71 73 79 83 89
5 7 11 13 17 19
7 11 13 17 19 23 29
17 19 23 29 31 37 41 43
239 241 251 257 263 269 271 277 281
13 17 19 23 29 31 37 41 43 47
29 31 37 41 43 47 53 59 61 67 71
5 7 11 13 17 19 23 29 31 37 41 43
		

Crossrefs

Cf. A054892 (first term of each row), A077388 (row sum), A077389 (row average).

Programs

  • Mathematica
    f[n_] := Block[{k = 1, t},While[t = Table[Prime[i], {i, k, k + n - 1}]; Mod[Plus @@ t, n] > 0, k++ ];t];Flatten[Table[f[n], {n, 12}]]
Showing 1-4 of 4 results.