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.

A082080 Smallest balanced prime of order n.

This page as a plain text file.
%I A082080 #28 Aug 04 2025 18:41:25
%S A082080 2,5,79,17,491,53,71,29,37,983,5503,173,157,353,5297,263,179,383,137,
%T A082080 2939,2083,751,353,5501,1523,149,4561,1259,397,787,8803,8803,607,227,
%U A082080 3671,17443,57097,3607,23671,12539,1217,11087,1087,21407,19759,953
%N A082080 Smallest balanced prime of order n.
%C A082080 Or, smallest (2n+1)-balanced prime number.
%C A082080 Prime(k) is a balanced prime of order n if it is the average of the 2n+1 primes from prime(k-n) to prime(k+n).
%H A082080 Giovanni Resta, <a href="/A082080/b082080.txt">Table of n, a(n) for n = 0..10000</a> (first 1375 terms from Robert G. Wilson v)
%e A082080 a(1) = 5 = (3 + 5 + 7)/3 = 15/3.
%e A082080 a(5) = 53 = (31 + 37 + 41 + 43 + 47 + 53 + 59 + 61 + 67 + 71 + 73)/11 = 583/11.
%e A082080 a(6) = 71 = (43 + 47 + 53 + 59 + 61 + 67 + 71 + 73 + 79 + 83 + 89 + 97 + 101)/13 = 923/13.
%t A082080 f[n_] := Block[{p = Prime@ Range[2n +1]}, While[ Total[p] != (2n +1) p[[n +1]], p = Join[Rest@ p, {NextPrime[ p[[-1]]] }]]; p[[n +1]]]; Array[f, 46, 0] (* _Robert G. Wilson v_, Jun 21 2004 and modified Apr 11 2017 *)
%o A082080 (PARI) for(n=0, 50, 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", ");f=1;break)); if(!f, print1("0, ")))
%Y A082080 Cf. A096693, A006562, A082077, A082078, A082079, A096697, A096698, A096699, A096700, A096701, A096702, A096703, A096704.
%Y A082080 Cf. A006562, A051795, A081415, A096710, A055380, A082312, A075540, A054800.
%K A082080 nonn
%O A082080 0,1
%A A082080 _Labos Elemer_, Apr 08 2003
%E A082080 Corrected and extended by _Ralf Stephan_, Apr 09 2003