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.

A103622 Smallest arithmetic mean of n distinct primes.

Original entry on oeis.org

2, 4, 4, 7, 6, 11, 10, 13, 12, 17, 16, 21, 20, 24, 24, 29, 26, 32, 32, 36, 36, 41, 38, 45, 44, 49, 48, 53, 52, 58, 58, 63, 62, 68, 66, 72, 70, 77, 76, 83, 80, 87, 86, 92, 90, 97, 96, 102, 100, 108, 106, 113, 110, 118, 116, 123, 122, 129, 126, 133, 132, 139, 138, 145, 142
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 25 2005

Keywords

Comments

Often a(2n+1) = a(2n) - 1. - Robert G. Wilson v, Jan 19 2007

Examples

			a(1)=2 because (2)/1=2,
a(2)=4 because (3+5)/2=4,
a(3)=4 because (2+3+7)/3=4,
a(4)=7 because (3+5+7+13)/4=7,
a(5)=6 because (2+3+5+7+13)/5=6,
a(6)=11 because (3+5+7+11+17+23)/6=11,
a(7)=10 because (2+3+5+7+11+13+29)/7=10,
a(8)=13 because (3+5+7+11+13+17+19+29)/8=13,
a(9)=12 because (2+3+5+7+11+13+17+19+31)/9=12,
a(10)=17 because (3+5+7+11+13+17+19+23+29+43)/10=17, etc.
		

Crossrefs

Cf. A072701.

Programs

  • Mathematica
    f[n_] := Block[{k = 1, lst = Prime@ Range[ If[ OddQ@ n, 1, 2], n + 3]}, While[ Mod[Plus @@ Flatten@Subsets[lst, {n}, {k}], n] != 0, k++ ]; (Plus @@ Flatten@ Subsets[lst, {n}, {k}])/n]; Array[f, 65] (* Robert G. Wilson v, Jan 19 2007 *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jan 19 2007